From: Andrew Svetlov Date: Thu, 9 Aug 2012 12:20:45 +0000 (+0300) Subject: Issue #15501: Document exception classes in subprocess module. X-Git-Tag: v3.3.0b2~13^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eec6420de498e49325c9a85a52bf8888446862f8;p=python Issue #15501: Document exception classes in subprocess module. Initial patch by Anton Barkovsky. --- diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 90a01d0a8f..efd25d1de2 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 diff --git a/Misc/ACKS b/Misc/ACKS index 1a094a1749..4d8f13c70e 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -52,6 +52,7 @@ Matt Bandy Michael J. Barber Nicolas Bareil Chris Barker +Anton Barkovsky Nick Barnes Quentin Barnes Richard Barran