summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-08-09 12:20:45 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-08-09 12:20:45 (GMT)
commiteec6420de498e49325c9a85a52bf8888446862f8 (patch)
tree497893c09a1064b0db5613f51c4d71aa80f757cb /Doc
parentc622f4254b945806d72f573bf7e530dff4d639bb (diff)
downloadcpython-eec6420de498e49325c9a85a52bf8888446862f8.zip
cpython-eec6420de498e49325c9a85a52bf8888446862f8.tar.gz
cpython-eec6420de498e49325c9a85a52bf8888446862f8.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.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 90a01d0..efd25d1 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -176,6 +176,26 @@ use cases, the underlying :class:`Popen` interface can be used directly.
output.
+.. exception:: CalledProcessError
+
+ Exception 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