summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2016-01-19 14:58:38 -0500
committerKenny Woodson <kwoodson@redhat.com>2016-01-19 14:58:38 -0500
commitcdf8cafd5d8ec1103758e39123b3f67b4f2c0722 (patch)
tree754c3aaa2b658e518127d0917a7c979af38e5f39
parenta0826d4f5b86dce8be0e7b006014efaca4d66d26 (diff)
parent952858ca62acf92879662339353ab819f8e0e30d (diff)
downloadopenshift-cdf8cafd5d8ec1103758e39123b3f67b4f2c0722.tar.gz
openshift-cdf8cafd5d8ec1103758e39123b3f67b4f2c0722.tar.bz2
openshift-cdf8cafd5d8ec1103758e39123b3f67b4f2c0722.tar.xz
openshift-cdf8cafd5d8ec1103758e39123b3f67b4f2c0722.zip
Merge pull request #1233 from kwoodson/remove_ruby
Fix for python yaml_validation.
-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()
+