diff options
author | andrei kulakov <andrei.avk@gmail.com> | 2022-10-07 17:08:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 17:08:08 (GMT) |
commit | 80b3e32d6242c27094dd04c4c3d0c3d3b2889a01 (patch) | |
tree | b6aef6c90bc242a44e3477f84dbd904d111729eb /Lib/subprocess.py | |
parent | 72c166add89a0cd992d66f75ce94eee5eb675a99 (diff) | |
download | cpython-80b3e32d6242c27094dd04c4c3d0c3d3b2889a01.zip cpython-80b3e32d6242c27094dd04c4c3d0c3d3b2889a01.tar.gz cpython-80b3e32d6242c27094dd04c4c3d0c3d3b2889a01.tar.bz2 |
Add note on capture_output arg to subprocess.run() docstring (#98012)
add note on capture_output arg to the docstring
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r-- | Lib/subprocess.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 760b93b..9cadd1b 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -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 |