summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-08-09 12:11:45 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-08-09 12:11:45 (GMT)
commitb4a09abfce9a8d38dbd4a8be38ca68cfe22e82f9 (patch)
treeedd932a54f413ad33bdb8ada29d44a57e396d2a4 /Doc
parente939f383c183806d82f9b07d27f766c03d170e18 (diff)
downloadcpython-b4a09abfce9a8d38dbd4a8be38ca68cfe22e82f9.zip
cpython-b4a09abfce9a8d38dbd4a8be38ca68cfe22e82f9.tar.gz
cpython-b4a09abfce9a8d38dbd4a8be38ca68cfe22e82f9.tar.bz2
Issue #15501: Document exception classes in subprocess module.
Initial patch by Anton Barkovsky.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/subprocess.rst48
1 files changed, 48 insertions, 0 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index a8d65b2..a67bf64 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -208,6 +208,54 @@ use cases, the underlying :class:`Popen` interface can be used directly.
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