diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-04-09 08:32:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-09 08:32:48 (GMT) |
commit | d6d943a090cffa8925fb5a5d92357dbdb15040c5 (patch) | |
tree | 72e203eef9a530810ddd8e090b723c697849abc8 /Tools/scripts/patchcheck.py | |
parent | e41390aca51e4e3eb455cf3b70f5d656a2814db9 (diff) | |
download | cpython-d6d943a090cffa8925fb5a5d92357dbdb15040c5.zip cpython-d6d943a090cffa8925fb5a5d92357dbdb15040c5.tar.gz cpython-d6d943a090cffa8925fb5a5d92357dbdb15040c5.tar.bz2 |
Issue #29798: Handle git worktree in patchcheck (#1057)
The original attempted fix missed an `isdir()` call in
`get_base_branch()`.
Diffstat (limited to 'Tools/scripts/patchcheck.py')
-rwxr-xr-x | Tools/scripts/patchcheck.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/scripts/patchcheck.py b/Tools/scripts/patchcheck.py index 9f7fb19..be46fe3 100755 --- a/Tools/scripts/patchcheck.py +++ b/Tools/scripts/patchcheck.py @@ -74,7 +74,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 |