Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
Fix tools/travis/build.py:get_new_commits() in the case where there a…
Browse files Browse the repository at this point in the history
…re no new commits

Return [] instead of [''] as the list of new commits in said case.
  • Loading branch information
cvrebert committed Oct 13, 2015
1 parent 0e53d2b commit d5069a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/travis/build.py
Expand Up @@ -131,7 +131,10 @@ def get_new_commits():
prev_commit = f.read().strip()

commit_range = "%s..%s" % (prev_commit, os.environ['TRAVIS_COMMIT'])
return reversed(git("log", "--pretty=%H", "-r", commit_range).strip().split("\n"))
commits = git("log", "--pretty=%H", "-r", commit_range).strip()
if not commits:
return []
return reversed(commits.split("\n"))

def maybe_push():
if os.environ["TRAVIS_PULL_REQUEST"] != "false":
Expand Down

0 comments on commit d5069a3

Please sign in to comment.