summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/patchcheck.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2017-04-09 08:33:03 (GMT)
committerGitHub <noreply@github.com>2017-04-09 08:33:03 (GMT)
commit2abfdf5a81383d3b1ed6b7321903a9a168c373c5 (patch)
tree884f55e2dfaf91314d5575442ccf51c8e3a63a72 /Tools/scripts/patchcheck.py
parent64c8f705c0121a4b45ca2c3bc7b47b282e9efcd8 (diff)
downloadcpython-2abfdf5a81383d3b1ed6b7321903a9a168c373c5.zip
cpython-2abfdf5a81383d3b1ed6b7321903a9a168c373c5.tar.gz
cpython-2abfdf5a81383d3b1ed6b7321903a9a168c373c5.tar.bz2
Issue #29798: Handle git worktree in patchcheck (#1058)
The original attempted fix missed an `isdir()` call in `get_base_branch()`.
Diffstat (limited to 'Tools/scripts/patchcheck.py')
-rwxr-xr-xTools/scripts/patchcheck.py2
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