Wrap the getbugs call in a try/except
This prevents a Bugzilla timeout from derailing the whole run Signed-off-by: Ben Cotton <bcotton@fedoraproject.org>
This commit is contained in:
parent
7062c63b77
commit
7f8483bf11
1 changed files with 6 additions and 1 deletions
|
|
@ -230,7 +230,12 @@ def cli(ctx, privacy):
|
|||
continue
|
||||
ids = [bug.bug_id for bug in bugs]
|
||||
user_comments = []
|
||||
for bug in bzclient.getbugs(ids):
|
||||
try:
|
||||
bzbugs = bzclient.getbugs(ids)
|
||||
except Exception:
|
||||
logging.error(f'Error while retrieving Bugzilla comments for user {username}')
|
||||
continue
|
||||
for bug in bzbugs:
|
||||
user_comments.extend([com for com in bug.longdescs if com['creator_id'] == bzuser.userid])
|
||||
if not user_comments:
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue