summaryrefslogtreecommitdiffstats
path: root/git
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2016-01-19 14:53:02 -0500
committerKenny Woodson <kwoodson@redhat.com>2016-01-19 14:57:41 -0500
commit952858ca62acf92879662339353ab819f8e0e30d (patch)
treed393e7780067fb1aa947cd9125682d9c15676066 /git
parent01ba7f730b9af8a81f88a5b12fb8a7031e624829 (diff)
downloadopenshift-952858ca62acf92879662339353ab819f8e0e30d.tar.gz
openshift-952858ca62acf92879662339353ab819f8e0e30d.tar.bz2
openshift-952858ca62acf92879662339353ab819f8e0e30d.tar.xz
openshift-952858ca62acf92879662339353ab819f8e0e30d.zip
Fixed a logic bug and yaml load
Diffstat (limited to 'git')
-rwxr-xr-xgit/yaml_validation.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/git/yaml_validation.py b/git/yaml_validation.py
index aa909b584..94b8b0435 100755
--- a/git/yaml_validation.py
+++ b/git/yaml_validation.py
@@ -47,15 +47,15 @@ def main():
print "+++++++ Received: %s" % file_mod
- if not file_mod.endswith('.yml') or not file_mod.endswith('.yaml'):
+ if not file_mod.endswith('.yml') and not file_mod.endswith('.yaml'):
continue
try:
- yaml.load(file_mod)
+ yaml.load(open(file_mod))
results.append(True)
except yaml.scanner.ScannerError as yerr:
- print yerr.message
+ print yerr
results.append(False)
finally:
shutil.rmtree(tmpdir)
@@ -65,3 +65,4 @@ def main():
if __name__ == "__main__":
main()
+