From: Andrew Svetlov Date: Thu, 9 Aug 2012 12:23:49 +0000 (+0300) Subject: Issue #15501: Document exception classes in subprocess module. X-Git-Tag: v2.7.4rc1~659 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8afcec41f46b643d30a60f0da9c7bc99498c5202;p=thirdparty%2FPython%2Fcpython.git 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 3aae13776221..1f7315922cd1 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -172,6 +172,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 39ba2a9be16d..56d576574349 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -44,6 +44,7 @@ Jeff Balogh Matt Bandy Michael J. Barber Chris Barker +Anton Barkovsky Nick Barnes Quentin Barnes Richard Barran