fix bug where unicode strings were used for kwargs

This commit is contained in:
Fernando Perez
2010-05-09 22:54:06 -07:00
parent d08e1bc2da
commit 5fe8078fee
+5 -1
View File
@@ -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):