summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugin.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugin.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin.py b/src/lib/Bcfg2/Server/Plugin.py
index 18d4bb05d..0b620c2d2 100644
--- a/src/lib/Bcfg2/Server/Plugin.py
+++ b/src/lib/Bcfg2/Server/Plugin.py
@@ -797,11 +797,16 @@ class INode:
self.children.append(mytype(item, idict, self))
else:
try:
- self.contents[item.tag][item.get('name')] = item.attrib
+ self.contents[item.tag][item.get('name')] = \
+ dict(item.attrib)
except KeyError:
- self.contents[item.tag] = {item.get('name'): item.attrib}
+ self.contents[item.tag] = {item.get('name'): dict(item.attrib)}
if item.text:
- self.contents[item.tag]['__text__'] = item.text
+ self.contents[item.tag][item.get('name')]['__text__'] = \
+ item.text
+ if item.getchildren():
+ self.contents[item.tag][item.get('name')]['__children__'] =\
+ item.getchildren()
try:
idict[item.tag].append(item.get('name'))
except KeyError: