mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
M #-: pyone: Use OrderedDict when storing _root (#2027)
This commit is contained in:
parent
c7382a5119
commit
bf6ef68bd1
@ -124,6 +124,9 @@ def child2dict(element):
|
||||
# Replace 'None' values returned by xmltodict by ""
|
||||
none2emptystr(ret)
|
||||
|
||||
if not isinstance(ret[tagName], OrderedDict) and isinstance(ret[tagName], dict):
|
||||
ret[tagName] = OrderedDict(ret[tagName])
|
||||
|
||||
# return the contents dictionary, but save a reference
|
||||
ret[tagName]._root = ret
|
||||
return ret[tagName]
|
||||
|
Loading…
x
Reference in New Issue
Block a user