From 952858ca62acf92879662339353ab819f8e0e30d Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Tue, 19 Jan 2016 14:53:02 -0500 Subject: Fixed a logic bug and yaml load --- git/yaml_validation.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'git') 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() + -- cgit v1.2.3