diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2023-11-22 17:27:44 -0500 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2023-11-22 17:27:44 -0500 |
commit | 7edf17f0619a7c3f9373469d4ac13cf7c79c3e06 (patch) | |
tree | 8dbf13c067d28652a98c2ec1550ccdcc2f09212f | |
parent | c9655096451c332be4a6604f944ca7d4c8a6397c (diff) | |
download | b4-7edf17f0619a7c3f9373469d4ac13cf7c79c3e06.tar.gz |
am: hotfix for when retrieved series isn't on patchwork
Fix a crash when the series we are retrieving isn't on patchwork.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r-- | b4/__init__.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/b4/__init__.py b/b4/__init__.py index 702fd9b..7d665f9 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -590,16 +590,15 @@ class LoreSeries: if lmsg is None: continue lmsg.load_ci_status() - if lmsg.pw_ci_status == 'pending': + if not lmsg.pw_ci_status or lmsg.pw_ci_status == 'pending': lmsg.pw_ci_status = None - logger.debug('CI status is "pending", skipping the rest of the checks') + logger.debug('CI status not useful, skipping the rest of the checks') break if series_url is None: pwdata = lmsg.get_patchwork_info() - series = pwdata.get('series') - if series: - for serie in series: - series_url = serie.get('web_url') + if pwdata and pwdata.get('series'): + for series in pwdata.get('series'): + series_url = series.get('web_url') break if lmsg.pw_ci_status == 'warning': ci_overall = 'warning' |