summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-repo-validate
diff options
context:
space:
mode:
Diffstat (limited to 'src/sbin/bcfg2-repo-validate')
-rwxr-xr-xsrc/sbin/bcfg2-repo-validate9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sbin/bcfg2-repo-validate b/src/sbin/bcfg2-repo-validate
index ee79e218a..4d8dd6bed 100755
--- a/src/sbin/bcfg2-repo-validate
+++ b/src/sbin/bcfg2-repo-validate
@@ -6,6 +6,7 @@ repos against their respective XML schemas.
"""
__revision__ = '$Revision$'
+import fnmatch
import glob
import lxml.etree
import os
@@ -59,9 +60,9 @@ if __name__ == '__main__':
opts = {'repo': Bcfg2.Options.SERVER_REPOSITORY,
'verbose': Bcfg2.Options.VERBOSE,
'configfile': Bcfg2.Options.CFILE,
- 'schema' : Bcfg2.Options.SCHEMA_PATH,
- 'stdin': Bcfg2.Options.FILES_ON_STDIN,
'require-schema': Bcfg2.Options.REQUIRE_SCHEMA}
+ 'schema': Bcfg2.Options.SCHEMA_PATH,
+ 'stdin': Bcfg2.Options.FILES_ON_STDIN}
setup = Bcfg2.Options.OptionParser(opts)
setup.parse(sys.argv[1:])
verbose = setup['verbose']
@@ -77,7 +78,7 @@ if __name__ == '__main__':
logging.basicConfig(level=level, format="%(message)s")
if setup['stdin']:
- file_list = map(lambda s: s.strip(), sys.stdin.readlines())
+ file_list = [s.strip() for s in sys.stdin.readlines()]
info_list = [f for f in file_list if os.path.basename(f) == 'info.xml']
metadata_list = fnmatch.filter(file_list, "*/Metadata/*.xml")
clients_list = fnmatch.filter(file_list, "*/Metadata/clients.xml")
@@ -98,7 +99,7 @@ if __name__ == '__main__':
if "%s.xsd" % os.path.splitext(f)[0] in file_list]
else:
# not reading files from stdin
-
+
# Get a list of all info.xml files in the bcfg2 repository
info_list = []
for infodir in ['Cfg', 'TGenshi', 'TCheetah']: