summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2016-01-28 14:34:09 -0500
committerKenny Woodson <kwoodson@redhat.com>2016-01-28 14:34:09 -0500
commit0e4a65a7c59bf887e8b7c7b0cdc8cfe1995fbdcb (patch)
tree496ee0fbac9d942a7a7d913383acc7d246b6ff42
parent8728336e8897d0cbeef845c1b4fb01208978bb81 (diff)
downloadopenshift-0e4a65a7c59bf887e8b7c7b0cdc8cfe1995fbdcb.tar.gz
openshift-0e4a65a7c59bf887e8b7c7b0cdc8cfe1995fbdcb.tar.bz2
openshift-0e4a65a7c59bf887e8b7c7b0cdc8cfe1995fbdcb.tar.xz
openshift-0e4a65a7c59bf887e8b7c7b0cdc8cfe1995fbdcb.zip
fixing logic for skipping symlinks
-rwxr-xr-xgit/yaml_validation.py7
1 files changed, 6 insertions, 1 deletions
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: