summaryrefslogtreecommitdiffstats
path: root/Lib/mailcap.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-02 00:00:06 (GMT)
committerGitHub <noreply@github.com>2020-04-02 00:00:06 (GMT)
commitd57cf557366584539f400db523b555296487e8f5 (patch)
treece70be7257e86e234700501c54579b576cae93b9 /Lib/mailcap.py
parent168660b547d5f683c5d3c60447cfa8c6d620efc3 (diff)
downloadcpython-d57cf557366584539f400db523b555296487e8f5.zip
cpython-d57cf557366584539f400db523b555296487e8f5.tar.gz
cpython-d57cf557366584539f400db523b555296487e8f5.tar.bz2
bpo-40094: mailcap.test() uses waitstatus_to_exitcode() (GH-19287)
mailcap.test() now uses os.waitstatus_to_exitcode() to convert os.system() exit status into an exit code.
Diffstat (limited to 'Lib/mailcap.py')
-rw-r--r--Lib/mailcap.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/mailcap.py b/Lib/mailcap.py
index bd0fc09..ae416a8 100644
--- a/Lib/mailcap.py
+++ b/Lib/mailcap.py
@@ -251,6 +251,7 @@ def test():
else:
print("Executing:", command)
sts = os.system(command)
+ sts = os.waitstatus_to_exitcode(sts)
if sts:
print("Exit status:", sts)