diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-06-29 16:16:14 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-06-29 16:16:14 +0000 |
commit | 7fb86e1272b9521d6192606a16357c2245562524 (patch) | |
tree | 7afe5d756578331ef2c6f84f70aca3026fbfce7c /src | |
parent | 46deefef7213ac2e93d8c7251cfbd587c226fd23 (diff) | |
download | bcfg2-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')
-rw-r--r-- | src/lib/Server/Plugins/Metadata.py | 5 |
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')) |