This commit is contained in:
Virendra Rajput 2013-04-08 10:30:11 -07:00
commit 111b808904

View file

@ -186,7 +186,12 @@ class Twython(object):
# why? twitter will return invalid json with an error code in the headers
json_error = False
try:
content = content.json()
try:
# try to get json
content = content.json()
except AttributeError:
# if unicode detected
content = json.loads(content)
except ValueError:
json_error = True
content = {}