Skip to content

Commit

Permalink
Merge pull request #8488 from cdrini/hotfix/mypy
Browse files Browse the repository at this point in the history
Fix mypy error
  • Loading branch information
cdrini committed Nov 2, 2023
2 parents d22a7ad + 5dc2dd1 commit 6852d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openlibrary/catalog/get_ia.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def urlopen_keep_trying(url: str, headers=None, **kwargs):
resp.raise_for_status()
return resp
except requests.HTTPError as error:
if error.response.status_code in (403, 404, 416):
if error.response and error.response.status_code in (403, 404, 416):
raise
sleep(2)

Expand Down

0 comments on commit 6852d17

Please sign in to comment.