Subf2m provider: improve queries

pull/2131/head v1.2.2-beta.19
Vitiko 1 year ago
parent 2b0e435f6a
commit 304ad160e0

@ -185,9 +185,9 @@ class Subf2mProvider(Provider):
logger.debug("Access to this resource is forbidden: %s", url) logger.debug("Access to this resource is forbidden: %s", url)
break break
# Sometimes subf2m will return a 503 code. This error usually disappears # Sometimes subf2m will return 404 or 503. This error usually disappears
# retrying the query # retrying the query
if req.status_code == 503: if req.status_code in (404, 503):
logger.debug("503 returned. Trying again [%d] in 3 seconds", n + 1) logger.debug("503 returned. Trying again [%d] in 3 seconds", n + 1)
time.sleep(3) time.sleep(3)
continue continue

Loading…
Cancel
Save