Skip to content

Commit

Permalink
Fix unicode check in Py2 #1725
Browse files Browse the repository at this point in the history
  • Loading branch information
clinton-hall committed Mar 7, 2020
1 parent c037387 commit b393c72
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit b393c72

Please sign in to comment.