diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-04-14 08:55:59 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-04-14 08:55:59 -0400 |
commit | e861c6134e556a90feda1c3681c12e68398daf5e (patch) | |
tree | 06719c68667884d87b03f23e6ce00ea42dcd9aab /src/sbin | |
parent | 31e91d3b8a8a11c60c6f0bb005ac6f680949b01d (diff) | |
parent | dd8594eb5427610ade2f1f8abf465cde8c9568fd (diff) | |
download | bcfg2-e861c6134e556a90feda1c3681c12e68398daf5e.tar.gz bcfg2-e861c6134e556a90feda1c3681c12e68398daf5e.tar.bz2 bcfg2-e861c6134e556a90feda1c3681c12e68398daf5e.zip |
resolved bcfg2-repo-validate conflicts
Diffstat (limited to 'src/sbin')
-rwxr-xr-x | src/sbin/bcfg2-repo-validate | 9 |
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']: |