WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix marshalling of Xen-API maps with non-string keys.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Mar 2007 14:10:08 -0700
Delivery-date: Thu, 22 Mar 2007 14:09:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix marshalling of Xen-API maps with non-string keys., Xen patchbot-unstable <=