mirror of
https://gitlab.com/RemixDev/deezer-py.git
synced 2025-01-29 17:18:28 +00:00
Fixed recursion in api calls
This commit is contained in:
parent
3e26371603
commit
e84cfbfbb5
|
@ -37,7 +37,7 @@ class API:
|
|||
headers=self.http_headers,
|
||||
timeout=30
|
||||
).json()
|
||||
except:
|
||||
except (requests.ConnectionError, requests.Timeout):
|
||||
sleep(2)
|
||||
return self.api_call(method, args)
|
||||
if 'error' in result_json.keys():
|
||||
|
|
|
@ -71,7 +71,7 @@ class GW:
|
|||
json=args,
|
||||
headers=self.http_headers
|
||||
).json()
|
||||
except:
|
||||
except (requests.ConnectionError, requests.Timeout):
|
||||
sleep(2)
|
||||
return self.api_call(method, args, params)
|
||||
if len(result_json['error']):
|
||||
|
|
Loading…
Reference in a new issue