Improve error handling
Co-authored-by: Andreas Rammhold <andreas@rammhold.de>
This commit is contained in:
co-authored by
Andreas Rammhold
parent
74463a4027
commit
ed6ea66495
@@ -198,7 +198,10 @@ def fetch_extensions() -> List[Dict[str, Any]]:
|
|||||||
f"\tThis page only has {responseLength} entries, so it must be the last one."
|
f"\tThis page only has {responseLength} entries, so it must be the last one."
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
except urllib.error.HTTPError:
|
except urllib.error.HTTPError as e:
|
||||||
|
if e.status != 404:
|
||||||
|
raise
|
||||||
|
break
|
||||||
# Assume this error is a 404. We hit the last page; we're done.
|
# Assume this error is a 404. We hit the last page; we're done.
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user