Fix unicode check in Py2 #1725 (#1727)

This commit is contained in:
Clinton Hall 2020-03-08 13:36:26 +13:00 committed by GitHub
commit 001f754cd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,7 +28,11 @@ def api_check(r, params, rem_params):
logger.debug('Response received: {}'.format(json_data))
raise
else:
if isinstance(json_data, str):
if six.PY3:
str_type = (str)
else:
str_type = (str, unicode)
if isinstance(json_data, str_type):
return rem_params, False
json_data = json_data.get('data', json_data)