Skip to content
Snippets Groups Projects
Commit 734edbc1 authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

Only retry for 40x

parent 66f66925
No related branches found
No related tags found
1 merge request!293Retry image download
This commit is part of merge request !293. Comments created here will be created in the context of that merge request.
......@@ -57,7 +57,7 @@ def download_image(url):
try:
resp = _retried_request(url)
except requests.HTTPError as e:
if e.response.status_code >= 400:
if 400 <= e.response.status_code < 500:
# Retry with max instead of full as IIIF size
resp = _retried_request(url.replace("/full/", "/max/"))
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment