Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eec6420

Browse files
committed
Issue #15501: Document exception classes in subprocess module.
Initial patch by Anton Barkovsky.
1 parent c622f42 commit eec6420

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

Doc/library/subprocess.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,26 @@ use cases, the underlying :class:`Popen` interface can be used directly.
176176
output.
177177

178178

179+
.. exception:: CalledProcessError
180+
181+
Exception raised when a process run by :func:`check_call` or
182+
:func:`check_output` returns a non-zero exit status.
183+
184+
.. attribute:: returncode
185+
186+
Exit status of the child process.
187+
188+
.. attribute:: cmd
189+
190+
Command that was used to spawn the child process.
191+
192+
.. attribute:: output
193+
194+
Output of the child process if this exception is raised by
195+
:func:`check_output`. Otherwise, ``None``.
196+
197+
198+
179199
.. _frequently-used-arguments:
180200

181201
Frequently Used Arguments

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Matt Bandy
5252
Michael J. Barber
5353
Nicolas Bareil
5454
Chris Barker
55+
Anton Barkovsky
5556
Nick Barnes
5657
Quentin Barnes
5758
Richard Barran

0 commit comments

Comments
 (0)