From 0e4a65a7c59bf887e8b7c7b0cdc8cfe1995fbdcb Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Thu, 28 Jan 2016 14:34:09 -0500 Subject: fixing logic for skipping symlinks --- git/yaml_validation.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'git') diff --git a/git/yaml_validation.py b/git/yaml_validation.py index 2b5c8ed49..69fd455a5 100755 --- a/git/yaml_validation.py +++ b/git/yaml_validation.py @@ -47,7 +47,12 @@ def main(): print "+++++++ Received: %s" % file_mod - if not file_mod.endswith('.yml') and not file_mod.endswith('.yaml') and not os.path.islink(file_mod): + # if the file extensions is not yml or yaml, move along. + if not file_mod.endswith('.yml') and not file_mod.endswith('.yaml'): + continue + + # We use symlinks in our repositories, ignore them. + if os.path.islink(file_mod): continue try: -- cgit v1.2.3