summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-02 01:42:47 (GMT)
committerGitHub <noreply@github.com>2020-04-02 01:42:47 (GMT)
commite7c98f08e228e9f6e139d61e3e5d0a5018a38f0b (patch)
tree8042e2caccb7d237c05fd23c7f103c45d10ad96d /Tools/scripts
parent9a679a0e47d58aa73b7747d4e16140048c10baf5 (diff)
downloadcpython-e7c98f08e228e9f6e139d61e3e5d0a5018a38f0b.zip
cpython-e7c98f08e228e9f6e139d61e3e5d0a5018a38f0b.tar.gz
cpython-e7c98f08e228e9f6e139d61e3e5d0a5018a38f0b.tar.bz2
bpo-40094: Fix which.py script exit code (GH-19286)
It now uses os.waitstatus_to_exitcode() to convert os.system() exit status into an exit code.
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/which.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tools/scripts/which.py b/Tools/scripts/which.py
index df54ce0..b42e07c 100755
--- a/Tools/scripts/which.py
+++ b/Tools/scripts/which.py
@@ -49,6 +49,7 @@ def main():
msg(filename + ': not executable')
if longlist:
sts = os.system('ls ' + longlist + ' ' + filename)
+ sts = os.waitstatus_to_exitcode(sts)
if sts: msg('"ls -l" exit status: ' + repr(sts))
if not ident:
msg(prog + ': not found')