summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2010-05-25 13:19:03 +0000
committerSol Jerome <solj@ices.utexas.edu>2010-05-25 08:33:02 -0500
commitc0f645a14ebeb2f42d219792dd576d3889acaab3 (patch)
treeaaca654059c1b9c31154f580ae721fb01c678a3c
parent49006f7886cb9f38a2b7cacd7b7c4ff32934c2b6 (diff)
downloadbcfg2-c0f645a14ebeb2f42d219792dd576d3889acaab3.tar.gz
bcfg2-c0f645a14ebeb2f42d219792dd576d3889acaab3.tar.bz2
bcfg2-c0f645a14ebeb2f42d219792dd576d3889acaab3.zip
Fixed XPath error with lxml 1.2.1
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5864 ce84e21b-d406-0410-9b95-82705330c041
-rwxr-xr-xsrc/sbin/bcfg2-repo-validate7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sbin/bcfg2-repo-validate b/src/sbin/bcfg2-repo-validate
index 685916fc9..47015f4ec 100755
--- a/src/sbin/bcfg2-repo-validate
+++ b/src/sbin/bcfg2-repo-validate
@@ -55,8 +55,11 @@ if __name__ == '__main__':
included.discard(filename)
# check for multiple default group definitions
- default_groups = lxml.etree.parse("%s/Metadata/groups.xml" \
- % repo).findall('.//Group[@default="true"]')
+ default_groups=[]
+ for grp in lxml.etree.parse("%s/Metadata/groups.xml" \
+ % repo).findall('.//Group'):
+ if grp.get('default') == 'true':
+ default_groups.append(grp)
if len(default_groups) > 1:
print("*** Warning: Multiple default groups defined")
for grp in default_groups: