We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a679a0 commit e7c98f0Copy full SHA for e7c98f0
Misc/NEWS.d/next/Tools-Demos/2020-04-02-01-22-21.bpo-40094.1XQQF6.rst
@@ -0,0 +1,3 @@
1
+Fix ``which.py`` script exit code: it now uses
2
+:func:`os.waitstatus_to_exitcode` to convert :func:`os.system` exit status
3
+into an exit code.
Tools/scripts/which.py
@@ -49,6 +49,7 @@ def main():
49
msg(filename + ': not executable')
50
if longlist:
51
sts = os.system('ls ' + longlist + ' ' + filename)
52
+ sts = os.waitstatus_to_exitcode(sts)
53
if sts: msg('"ls -l" exit status: ' + repr(sts))
54
if not ident:
55
msg(prog + ': not found')
0 commit comments