fixed bug in post request
This commit is contained in:
parent
3aa6faab51
commit
be48707623
@ -67,10 +67,13 @@ class Page:
|
||||
r = cls.API_SESSION.post(url, json=json, timeout=cls.TIMEOUT)
|
||||
except requests.exceptions.Timeout:
|
||||
retry = True
|
||||
except requests.exceptions.ConnectionError:
|
||||
retry = True
|
||||
|
||||
if not retry and r.status_code in accepted_response_codes:
|
||||
return r
|
||||
|
||||
if not retry:
|
||||
LOGGER.warning(f"{cls.__name__} responded wit {r.status_code} at POST:{url}. ({trie}-{cls.TRIES})")
|
||||
LOGGER.debug(r.content)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user