ia64/xen-unstable

changeset 14516:5c529af40697

Fix marshalling of Xen-API maps with non-string keys.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author Ewan Mellor <ewan@xensource.com>
date Thu Mar 22 14:27:05 2007 +0000 (2007-03-22)
parents 6519867be0fe
children 4baae9f9fdbb
files tools/python/xen/util/xmlrpclib2.py
line diff
     1.1 --- a/tools/python/xen/util/xmlrpclib2.py	Thu Mar 22 12:22:16 2007 +0000
     1.2 +++ b/tools/python/xen/util/xmlrpclib2.py	Thu Mar 22 14:27:05 2007 +0000
     1.3 @@ -54,9 +54,10 @@ def stringify(value):
     1.4         (isinstance(value, int) and not isinstance(value, bool)):
     1.5          return str(value)
     1.6      elif isinstance(value, dict):
     1.7 +        new_value = {}
     1.8          for k, v in value.items():
     1.9 -            value[k] = stringify(v)
    1.10 -        return value
    1.11 +            new_value[stringify(k)] = stringify(v)
    1.12 +        return new_value
    1.13      elif isinstance(value, (tuple, list)):
    1.14          return [stringify(v) for v in value]
    1.15      else: