twython3k: simplejson wants string, not bytes

This commit is contained in:
Edward Hades 2011-02-25 13:55:02 +01:00
parent e1f0b1ea56
commit 3fb328d2ec

View file

@ -155,7 +155,7 @@ class Twython(object):
url = base + "?" + "&".join(["%s=%s" %(key, value) for (key, value) in list(kwargs.items())])
resp, content = self.client.request(url, fn['method'])
return simplejson.loads(content)
return simplejson.loads(content.decode('utf-8'))
if api_call in api_table:
return get.__get__(self)