Update api.py

This commit is contained in:
Richard Bronkhorst 2023-06-25 20:21:49 +02:00
parent 2a5680c16d
commit 35bc586b72

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, requests.exception.Timeout):
except (ApiLimitError, requests.exceptions.Timeout):
print('oops, hit the limit. take a break')
sleep(10)
return self.request_once(method, path, data, need_token, params)