diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-04-09 09:22:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-09 09:22:50 (GMT) |
commit | c82d39479a88154bd72a3a304be5f473c118da95 (patch) | |
tree | 7d80723a7f2c86aa462e453aae815d1f62d3831f /Tools | |
parent | e63f8f293a96ceebf06de15b4e1c97dbbff0f6a8 (diff) | |
download | cpython-c82d39479a88154bd72a3a304be5f473c118da95.zip cpython-c82d39479a88154bd72a3a304be5f473c118da95.tar.gz cpython-c82d39479a88154bd72a3a304be5f473c118da95.tar.bz2 |
bpo-29798: Handle git worktree in patchcheck
The original attempted fix missed an `isdir()` call in
`get_base_branch()`.
(cherry picked from commit 2abfdf5a81383d3b1ed6b7321903a9a168c373c5)
Diffstat (limited to 'Tools')
-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 f4ec7d8..33a9fea 100755 --- a/Tools/scripts/patchcheck.py +++ b/Tools/scripts/patchcheck.py @@ -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 |