mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Fix marshalling of Xen-API maps with non-string keys.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This commit is contained in:
1 parent
630a9be9d0
commit
830355957c
1 file changed
+3
-2
@@ -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:
|
||||
|
||||