summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugin.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-03-23 02:55:31 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-03-23 02:55:31 +0000
commit2658fb67af26cc2d0590e7d62244d61d3685c8f7 (patch)
treec8ada6c610beee364307c4ce08888c5d4f089ef6 /src/lib/Server/Plugin.py
parent41ba7f4412ca9f6d8ba9e180e0278b071d3b6c75 (diff)
downloadbcfg2-2658fb67af26cc2d0590e7d62244d61d3685c8f7.tar.gz
bcfg2-2658fb67af26cc2d0590e7d62244d61d3685c8f7.tar.bz2
bcfg2-2658fb67af26cc2d0590e7d62244d61d3685c8f7.zip
Fix child node issues in Pkgmgr (for Ignore/Instance)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2991 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugin.py')
-rw-r--r--src/lib/Server/Plugin.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py
index 8bbf6cdac..9a4d8fb1e 100644
--- a/src/lib/Server/Plugin.py
+++ b/src/lib/Server/Plugin.py
@@ -1,7 +1,7 @@
'''This module provides the baseclass for Bcfg2 Server Plugins'''
__revision__ = '$Revision$'
-import logging, lxml.etree, re
+import logging, lxml.etree, re, copy
from lxml.etree import XML, XMLSyntaxError
@@ -356,7 +356,10 @@ class PrioDir(Plugin, XMLDirectoryBacked):
index = prio.index(max(prio))
data = matching[index].cache[1][entry.tag][name]
- [entry.attrib.__setitem__(key, data[key]) for key in data.keys()]
if data.has_key('__text__'):
- del entry.attrib['__text__']
entry.text = data['__text__']
+ del data['__text__']
+ if data.has_key('__children__'):
+ [entry.append(copy.deepcopy(item)) for item in data['__children__']]
+ del data['__children__']
+ [entry.attrib.__setitem__(key, data[key]) for key in data.keys()]