diff options
author | Tim Laszlo <tim.laszlo@gmail.com> | 2010-05-25 13:19:03 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2010-05-25 08:33:02 -0500 |
commit | c0f645a14ebeb2f42d219792dd576d3889acaab3 (patch) | |
tree | aaca654059c1b9c31154f580ae721fb01c678a3c | |
parent | 49006f7886cb9f38a2b7cacd7b7c4ff32934c2b6 (diff) | |
download | bcfg2-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-x | src/sbin/bcfg2-repo-validate | 7 |
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: |