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

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This commit is contained in:
Ewan Mellor committed 2007-03-22 14:27:05 +00:00
1 parent 630a9be9d0
commit 830355957c
1 file changed
+3 -2
+3 -2
View File
@@ -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:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.