]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add note on capture_output arg to subprocess.run() docstring (GH-98012)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 7 Oct 2022 17:54:54 +0000 (10:54 -0700)
committerGitHub <noreply@github.com>
Fri, 7 Oct 2022 17:54:54 +0000 (10:54 -0700)
add note on capture_output arg to the docstring
(cherry picked from commit 80b3e32d6242c27094dd04c4c3d0c3d3b2889a01)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Lib/subprocess.py

index e5d7f0981861413710aea048e8bfe5230cca22d7..ffe9170b68b25dca69dbc481f7d42cd07ea7b0a8 100644 (file)
@@ -464,7 +464,8 @@ def run(*popenargs,
 
     The returned instance will have attributes args, returncode, stdout and
     stderr. By default, stdout and stderr are not captured, and those attributes
-    will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.
+    will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
+    or pass capture_output=True to capture both.
 
     If check is True and the exit code was non-zero, it raises a
     CalledProcessError. The CalledProcessError object will have the return code