This commit is contained in:
Mike Helmick 2012-10-29 12:37:16 -04:00
parent 4e86da4aec
commit 98e213df9c

View file

@ -165,6 +165,11 @@ class Twython(object):
raise TwythonError('Method must be of GET or POST')
params = params or {}
# requests doesn't like items that can't be converted to unicode,
# so let's be nice and do that for the user
for k, v in params.items():
if isinstance(v, (int, bool)):
params[k] = u'%s' % v
func = getattr(self.client, method)
if method == 'get':
@ -185,7 +190,6 @@ class Twython(object):
'content': content,
}
# wrap the json loads in a try, and defer an error
# why? twitter will return invalid json with an error code in the headers
json_error = False