[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Fix marshalling of Xen-API maps with non-string keys.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174573625 0
# Node ID 5c529af4069771179eb59053c3a6d94abde1179f
# Parent  6519867be0fe862ce97eeb66d43edfb7bab35aaa
Fix marshalling of Xen-API maps with non-string keys.

Signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
 tools/python/xen/util/xmlrpclib2.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r 6519867be0fe -r 5c529af40697 tools/python/xen/util/xmlrpclib2.py
--- a/tools/python/xen/util/xmlrpclib2.py       Thu Mar 22 12:22:16 2007 +0000
+++ b/tools/python/xen/util/xmlrpclib2.py       Thu Mar 22 14:27:05 2007 +0000
@@ -54,9 +54,10 @@ def stringify(value):
        (isinstance(value, int) and not isinstance(value, bool)):
         return str(value)
     elif isinstance(value, dict):
+        new_value = {}
         for k, v in value.items():
-            value[k] = stringify(v)
-        return value
+            new_value[stringify(k)] = stringify(v)
+        return new_value
     elif isinstance(value, (tuple, list)):
         return [stringify(v) for v in value]
     else:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.