summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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()
+