Skip to content

Commit

Permalink
Issue python#29798: Handle git worktree in patchcheck (python#1058)
Browse files Browse the repository at this point in the history
The original attempted fix missed an `isdir()` call in
`get_base_branch()`.
(cherry picked from commit 2abfdf5)
  • Loading branch information
ncoghlan committed Apr 9, 2017
1 parent af685f9 commit d53c63f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tools/scripts/patchcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def get_git_upstream_remote():
@status("Getting base branch for PR",
info=lambda x: x if x is not None else "not a PR branch")
def get_base_branch():
if not os.path.isdir(os.path.join(SRCDIR, '.git')):
if not os.path.exists(os.path.join(SRCDIR, '.git')):
# Not a git checkout, so there's no base branch
return None
version = sys.version_info
Expand Down

0 comments on commit d53c63f

Please sign in to comment.