summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/sbin/bcfg2-repo-validate19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/sbin/bcfg2-repo-validate b/src/sbin/bcfg2-repo-validate
index a1166e82a..ee5d74487 100755
--- a/src/sbin/bcfg2-repo-validate
+++ b/src/sbin/bcfg2-repo-validate
@@ -1,6 +1,9 @@
#!/usr/bin/env python
-'''bcfg2-repo-validate checks all xml files in Bcfg2 repos against their respective XML schemas'''
+'''
+bcfg2-repo-validate checks all xml files in Bcfg2
+repos against their respective XML schemas
+'''
__revision__ = '$Revision$'
import glob, lxml.etree, os, sys
@@ -21,15 +24,12 @@ if __name__ == '__main__':
os.chdir(schemadir)
repo = setup['repo']
- '''
- Get a list of all info.xml files
- in Cfg directory and subdirectories
- '''
+ # Get a list of all info.xml files in the bcfg2 repository
info_list = []
- for root, dirs, files in os.walk('%s/Cfg' % repo):
- for filename in files:
+ for root, dirs, files in os.walk('%s' % repo):
+ for filename in files:
if filename.endswith('info.xml'):
- info_list.append(os.path.join(root, filename))
+ info_list.append(os.path.join(root, filename))
# get lists of all other xml files to validate
metadata_list = glob.glob("%s/Metadata/groups.xml" % repo)
@@ -77,7 +77,8 @@ if __name__ == '__main__':
if verbose:
print "%s checks out" % (filename)
else:
- rc = os.system("xmllint --noout --xinclude --schema %s %s > /dev/null 2>/dev/null" % \
+ rc = os.system("xmllint --noout --xinclude --schema \
+ %s %s > /dev/null 2>/dev/null" % \
(schemaname % schemadir, filename))
if rc:
failures = 1