mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-05 10:58:01 -05:00
Make sure we're returning the result of the recursive request
This commit is contained in:
parent
a3bb636df2
commit
9cfc3e3788
@ -29,7 +29,11 @@ class TraktAPI():
|
||||
resp.raise_for_status()
|
||||
resp = resp.json()
|
||||
except (requests.HTTPError, requests.ConnectionError) as e:
|
||||
if e.response.status_code == 401:
|
||||
if e.response.status_code == 502:
|
||||
# Retry the request, cloudflare had a proxying issue
|
||||
logger.log(u"Retrying trakt api request: auth/login", logger.WARNING)
|
||||
return self.validateAccount()
|
||||
elif e.response.status_code == 401:
|
||||
raise traktAuthException(e)
|
||||
if 'token' in resp:
|
||||
self.token = resp['token']
|
||||
@ -57,7 +61,7 @@ class TraktAPI():
|
||||
if e.response.status_code == 502:
|
||||
# Retry the request, cloudflare had a proxying issue
|
||||
logger.log(u"Retrying trakt api request: %s" % path, logger.WARNING)
|
||||
self.traktRequest(path, data, method)
|
||||
return self.traktRequest(path, data, method)
|
||||
elif e.response.status_code == 401:
|
||||
raise traktAuthException(e)
|
||||
elif e.response.status_code == 503:
|
||||
|
Loading…
Reference in New Issue
Block a user