Fixed recursion in api calls

This commit is contained in:
RemixDev 2021-12-07 12:01:36 +01:00
parent 3e26371603
commit e84cfbfbb5
2 changed files with 2 additions and 2 deletions

View file

@ -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():

View file

@ -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']):