[Python-checkins] Make docs of exitcode for subprocess.getstatusoutput more clear. (GH-9477)
Miss Islington (bot)
webhook-mailer at python.org
Fri Sep 21 16:30:53 EDT 2018
https://github.com/python/cpython/commit/29da8392a7ffa3e72212809e4838a11ee6e134d1
commit: 29da8392a7ffa3e72212809e4838a11ee6e134d1
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-09-21T13:30:50-07:00
summary:
Make docs of exitcode for subprocess.getstatusoutput more clear. (GH-9477)
Make it more accurate and not limited to UNIX.
(cherry picked from commit 7d161726e4ddd2b2cdd7ac58a7e9e9ea3f57a807)
Co-authored-by: Xiang Zhang <angwerzx at 126.com>
files:
M Doc/library/subprocess.rst
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index f624adbda4c8..dfb183aba547 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -1199,14 +1199,15 @@ handling consistency are valid for these functions.
Windows support was added.
The function now returns (exitcode, output) instead of (status, output)
- as it did in Python 3.3.3 and earlier. See :func:`WEXITSTATUS`.
+ as it did in Python 3.3.3 and earlier. exitcode has the same value as
+ :attr:`~Popen.returncode`.
.. function:: getoutput(cmd)
Return output (stdout and stderr) of executing *cmd* in a shell.
- Like :func:`getstatusoutput`, except the exit status is ignored and the return
+ Like :func:`getstatusoutput`, except the exit code is ignored and the return
value is a string containing the command's output. Example::
>>> subprocess.getoutput('ls /bin/ls')
More information about the Python-checkins
mailing list