Skip to content

Commit 69029bd

Browse files
Add note on capture_output arg to subprocess.run() docstring (GH-98012)
add note on capture_output arg to the docstring (cherry picked from commit 80b3e32) Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
1 parent 245ea1f commit 69029bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/subprocess.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,8 @@ def run(*popenargs,
509509
510510
The returned instance will have attributes args, returncode, stdout and
511511
stderr. By default, stdout and stderr are not captured, and those attributes
512-
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.
512+
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
513+
or pass capture_output=True to capture both.
513514
514515
If check is True and the exit code was non-zero, it raises a
515516
CalledProcessError. The CalledProcessError object will have the return code

0 commit comments

Comments
 (0)