summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Metadata.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-06-29 16:16:14 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-06-29 16:16:14 +0000
commit7fb86e1272b9521d6192606a16357c2245562524 (patch)
tree7afe5d756578331ef2c6f84f70aca3026fbfce7c /src/lib/Server/Plugins/Metadata.py
parent46deefef7213ac2e93d8c7251cfbd587c226fd23 (diff)
downloadbcfg2-7fb86e1272b9521d6192606a16357c2245562524.tar.gz
bcfg2-7fb86e1272b9521d6192606a16357c2245562524.tar.bz2
bcfg2-7fb86e1272b9521d6192606a16357c2245562524.zip
use xpath instead of lxml api (should relax the 1.2 requirement to 1.1)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3391 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Metadata.py')
-rw-r--r--src/lib/Server/Plugins/Metadata.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py
index f4daf99b7..2ef9b1f59 100644
--- a/src/lib/Server/Plugins/Metadata.py
+++ b/src/lib/Server/Plugins/Metadata.py
@@ -137,9 +137,8 @@ class Metadata(Bcfg2.Server.Plugin.Plugin):
self.groups = {}
grouptmp = {}
self.categories = {}
- for group in xdata.findall('.//Group'):
- if group.getparent().tag == 'Group':
- continue
+ for group in xdata.xpath('//Groups/Group') \
+ + xdata.xpath('Group'):
grouptmp[group.get('name')] = tuple([[item.get('name') for item in group.findall(spec)]
for spec in ['./Bundle', './Group']])
grouptmp[group.get('name')][1].append(group.get('name'))