mirror of
https://github.com/kennethreitz-archive/github2.git
synced 2026-06-05 15:40:19 +00:00
fix bug where unicode strings were used for kwargs
This commit is contained in:
+5
-1
@@ -49,7 +49,11 @@ class GithubCommand(object):
|
||||
datatype = kwargs.pop("datatype", None)
|
||||
value = self.make_request(*args, **kwargs)
|
||||
if datatype:
|
||||
return datatype(**value)
|
||||
# unicode keys are not accepted as kwargs by python, see:
|
||||
#http://mail-archives.apache.org/mod_mbox/qpid-dev/200609.mbox/%3C1159389941.4505.10.camel@localhost.localdomain%3E
|
||||
# So we make a local dict with the same keys but as strings:
|
||||
val = dict( (str(k), v) for (k,v) in value.iteritems() )
|
||||
return datatype(**val)
|
||||
return value
|
||||
|
||||
def get_values(self, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user