diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2016-01-19 14:58:38 -0500 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2016-01-19 14:58:38 -0500 |
commit | cdf8cafd5d8ec1103758e39123b3f67b4f2c0722 (patch) | |
tree | 754c3aaa2b658e518127d0917a7c979af38e5f39 | |
parent | a0826d4f5b86dce8be0e7b006014efaca4d66d26 (diff) | |
parent | 952858ca62acf92879662339353ab819f8e0e30d (diff) | |
download | openshift-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-x | git/yaml_validation.py | 7 |
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() + |