diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2009-04-23 16:33:20 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2009-04-23 16:33:20 +0000 |
commit | 1a90ceb3e02e50a54bc0267571e0f4554201b579 (patch) | |
tree | edd3944fe64408295901fc8b7c340d0c659fc627 /src/sbin/bcfg2-repo-validate | |
parent | 4869aaf3a4cbf1034ff3c457c546aa82999fda65 (diff) | |
download | bcfg2-1a90ceb3e02e50a54bc0267571e0f4554201b579.tar.gz bcfg2-1a90ceb3e02e50a54bc0267571e0f4554201b579.tar.bz2 bcfg2-1a90ceb3e02e50a54bc0267571e0f4554201b579.zip |
More python 2to3 updates along with pylint/code cleanups
Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5173 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin/bcfg2-repo-validate')
-rwxr-xr-x | src/sbin/bcfg2-repo-validate | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sbin/bcfg2-repo-validate b/src/sbin/bcfg2-repo-validate index 4c692e362..6fb157ec8 100755 --- a/src/sbin/bcfg2-repo-validate +++ b/src/sbin/bcfg2-repo-validate @@ -86,46 +86,46 @@ if __name__ == '__main__': } failures = 0 - for k, (filelist, schemaname) in filesets.iteritems(): + for k, (filelist, schemaname) in list(filesets.items()): try: schema = lxml.etree.XMLSchema(lxml.etree.parse(open(schemaname%(schemadir)))) except: - print "Failed to process schema %s" % (schemaname%(schemadir)) + print("Failed to process schema %s" % (schemaname%(schemadir))) failures = 1 continue for filename in filelist: try: datafile = lxml.etree.parse(open(filename)) except SyntaxError: - print "%s ***FAILS*** to parse \t\t<----" % (filename) + print("%s ***FAILS*** to parse \t\t<----" % (filename)) os.system("xmllint %s" % filename) failures = 1 continue except IOError: - print "Failed to open file %s \t\t<---" % (filename) + print("Failed to open file %s \t\t<---" % (filename)) failures = 1 continue if schema.validate(datafile): if verbose: - print "%s checks out" % (filename) + print("%s checks out" % (filename)) else: rc = os.system("xmllint --noout --xinclude --schema \ %s %s > /dev/null 2>/dev/null" % \ (schemaname % schemadir, filename)) if rc: failures = 1 - print "%s ***FAILS*** to verify \t\t<----" % (filename) + print("%s ***FAILS*** to verify \t\t<----" % (filename)) os.system("xmllint --noout --xinclude --schema %s %s" % \ (schemaname % schemadir, filename)) elif verbose: - print "%s checks out" % (filename) + print("%s checks out" % (filename)) # print out missing bundle information if verbose: print("") for bundle in ref_bundles: if bundle not in bundle_list: - print ("*** Warning: Bundle %s referenced, but does not " + print("*** Warning: Bundle %s referenced, but does not " "exist." % bundle) raise SystemExit, failures |