]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Make docs of exitcode for subprocess.getstatusoutput more clear. (GH-9477)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 21 Sep 2018 20:30:50 +0000 (13:30 -0700)
committerGitHub <noreply@github.com>
Fri, 21 Sep 2018 20:30:50 +0000 (13:30 -0700)
Make it more accurate and not limited to UNIX.
(cherry picked from commit 7d161726e4ddd2b2cdd7ac58a7e9e9ea3f57a807)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
Doc/library/subprocess.rst

index f624adbda4c805ae5b4d325042785bc54e80b3c1..dfb183aba547f4482d14e67034eb1e11a13acd56 100644 (file)
@@ -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')