mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
M #-: pyone: Use OrderedDict when storing _root (#2027)
(cherry picked from commit bf6ef68bd15a825e5ccb1ce3602f868257d6a22a)
This commit is contained in:
parent
c3d6e65612
commit
e5e16ef9b5
@ -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