Skip to content

Commit

Permalink
Fix json exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
asdil12 committed Mar 27, 2024
1 parent c314739 commit 9213561
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/fetch_openqa_bugs
Expand Up @@ -57,7 +57,7 @@ for bug_dbid, bugid in bugs.items():
except (AssertionError, requests.exceptions.ReadTimeout) as e:
print(" -> ERROR: %s" % e)
except (json.decoder.JSONDecodeError, simplejson.errors.JSONDecodeError) as e:
print(" -> ERROR: %s: JSON: %s…" % (e, sys.last_value.doc[:50]))
print(" -> ERROR: %s: JSON: %s…" % (e, e.doc[:50]))
except Exception as e:
print(f"Exception occured while fetching {bugid}", file=sys.stderr)
raise e

0 comments on commit 9213561

Please sign in to comment.