Author: reinhard
Date: 2005-04-21 17:55:34 -0500 (Thu, 21 Apr 2005)
New Revision: 7456
Modified:
trunk/gnue-common/src/rpc/drivers/xmlrpc/pw_xmlrpc/typeconv.py
Log:
Workaround for xmlrpclib in Python 2.3.4 not liking Unicode dictionary keys.
Modified: trunk/gnue-common/src/rpc/drivers/xmlrpc/pw_xmlrpc/typeconv.py
===================================================================
--- trunk/gnue-common/src/rpc/drivers/xmlrpc/pw_xmlrpc/typeconv.py
2005-04-21 22:49:56 UTC (rev 7455)
+++ trunk/gnue-common/src/rpc/drivers/xmlrpc/pw_xmlrpc/typeconv.py
2005-04-21 22:55:34 UTC (rev 7456)
@@ -78,6 +78,10 @@
elif isinstance (value, types.DictionaryType):
result = {}
for (key, val) in value.items ():
+ # Workaround for a bug xmlrpclib <= Python 2.3.4: No Unicode strings
+ # possible as dictionary keys.
+ if isinstance (key, types.UnicodeType):
+ key = key.encode ('utf-8')
result [python_to_rpc (key, exception)] = python_to_rpc (val, exception)
return result
_______________________________________________
Commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue