Fixes an issue in the 1.4.5 point release, first pointed out by @michaelhelmick, fixed thanks to "tatz_tsuchiya".
This commit is contained in:
parent
ae5e63150b
commit
fcbc702ae5
1 changed files with 4 additions and 2 deletions
|
|
@ -176,8 +176,10 @@ class Twython(object):
|
|||
# If they don't do authentication, but still want to request unprotected resources, we need an opener.
|
||||
self.client = httplib2.Http(**client_args)
|
||||
# register available funcs to allow listing name when debugging.
|
||||
def setFunc(key):
|
||||
return lambda **kwargs: self._constructFunc(key, **kwargs)
|
||||
for key in api_table.keys():
|
||||
self.__dict__[key] = lambda **kwargs: self._constructFunc(key, **kwargs)
|
||||
self.__dict__[key] = setFunc(key)
|
||||
|
||||
def _constructFunc(self, api_call, **kwargs):
|
||||
# Go through and replace any mustaches that are in our API url.
|
||||
|
|
@ -503,4 +505,4 @@ class Twython(object):
|
|||
def encode(text):
|
||||
if isinstance(text, (str,unicode)):
|
||||
return Twython.unicode2utf8(text)
|
||||
return str(text)
|
||||
return str(text)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue