Don't check symlinks for license headers

Because it tried to open the symlink and caused an error. So ignore symlinks.

TEST=tried uploading a CL with a symlink
TEST=`./` passes

Change-Id: I07f2394a832d82e692fbe5ec4d3ec270a671dcaa
Reviewed-by: Mike Frysinger <>
Commit-Queue: Wai-Hong Tam <>
Tested-by: Wai-Hong Tam <>
diff --git a/ b/
index 59836ad..235b037 100755
--- a/
+++ b/
@@ -168,8 +168,8 @@
   for f in files:
-    # Ignore non-existant files
-    if os.path.exists(f):
+    # Ignore non-existant files and symlinks
+    if os.path.exists(f) and not os.path.islink(f):
       contents = open(f).read()
       if not contents:
         # Ignore empty files