Skip to content

Commit 2ae3687

Browse files
Fix linter crash on non-PR travis runs
1 parent 3f055f3 commit 2ae3687

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

utils/run_linter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def get_changed_lines():
8686
cmd = ["git", "diff", "--name-only", "--diff-filter", "AM", base]
8787
sha1s = ["000000000"];
8888
# Find all sha's on this branch
89-
sha1s += [commit[:9] for commit in system(["git", "rev-list", base + "..HEAD"]).rstrip().split('\n')]
89+
sha1s += [commit[:9] for commit in system(["git", "rev-list", base + "..HEAD"]).rstrip().split('\n') if commit]
9090
logging.debug("Mathing SHA1s: %s", sha1s)
9191
files = system(cmd).rstrip().split("\n")
9292
for _file in files:

0 commit comments

Comments
 (0)