]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add note on capture_output arg to subprocess.run() docstring (#98012)
authorandrei kulakov <andrei.avk@gmail.com>
Fri, 7 Oct 2022 17:08:08 +0000 (13:08 -0400)
committerGitHub <noreply@github.com>
Fri, 7 Oct 2022 17:08:08 +0000 (10:08 -0700)
add note on capture_output arg to the docstring

Lib/subprocess.py

index 760b93b47ebba673e3e50d958a998aa78ba0495d..9cadd1bf8e622c1fdde441baeb3034ea1c684df7 100644 (file)
@@ -509,7 +509,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