Update api.py

This commit is contained in:
Richard Bronkhorst 2023-06-25 19:32:35 +02:00
parent 4d51ad53c0
commit 2a5680c16d

View File

@ -31,7 +31,7 @@ class Api:
def request(self, method, path, data=None, need_token=True, params={}):
try:
return self.request_once(method, path, data, need_token, params)
except ApiLimitError:
except (ApiLimitError, requests.exception.Timeout):
print('oops, hit the limit. take a break')
sleep(10)
return self.request_once(method, path, data, need_token, params)