fix api check

This commit is contained in:
Clinton Hall 2020-03-02 21:56:59 +13:00 committed by GitHub
commit f8de0c1ccf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,9 +21,6 @@ def api_check(r, params, rem_params):
logger.debug('Response received')
raise
if isinstance(json_data, str):
return rem_params, False
try:
json_data = json_data['data']
except KeyError:
@ -31,6 +28,8 @@ def api_check(r, params, rem_params):
logger.debug('Response received: {}'.format(json_data))
raise
else:
if isinstance(json_data, str):
return rem_params, False
json_data = json_data.get('data', json_data)
try: