Commit b4a09abf authored by Andrew Svetlov's avatar Andrew Svetlov

Issue #15501: Document exception classes in subprocess module.

Initial patch by Anton Barkovsky.
parent e939f383
...@@ -208,6 +208,54 @@ use cases, the underlying :class:`Popen` interface can be used directly. ...@@ -208,6 +208,54 @@ use cases, the underlying :class:`Popen` interface can be used directly.
output. output.
.. exception:: SubprocessError
Base class for all other exceptions from this module.
.. versionadded:: 3.3
.. exception:: TimeoutExpired
Subclass of :exc:`SubprocessError`, raised when a timeout expires
while waiting for a child process.
.. attribute:: cmd
Command that was used to spawn the child process.
.. attribute:: timeout
Timeout in seconds.
.. attribute:: output
Output of the child process if this exception is raised by
:func:`check_output`. Otherwise, ``None``.
.. versionadded:: 3.3
.. exception:: CalledProcessError
Subclass of :exc:`SubprocessError`, raised when a process run by
:func:`check_call` or :func:`check_output` returns a non-zero exit status.
.. attribute:: returncode
Exit status of the child process.
.. attribute:: cmd
Command that was used to spawn the child process.
.. attribute:: output
Output of the child process if this exception is raised by
:func:`check_output`. Otherwise, ``None``.
.. _frequently-used-arguments: .. _frequently-used-arguments:
Frequently Used Arguments Frequently Used Arguments
......
...@@ -56,6 +56,7 @@ Matt Bandy ...@@ -56,6 +56,7 @@ Matt Bandy
Michael J. Barber Michael J. Barber
Nicolas Bareil Nicolas Bareil
Chris Barker Chris Barker
Anton Barkovsky
Nick Barnes Nick Barnes
Quentin Barnes Quentin Barnes
David Barnett David Barnett
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment