]> granicus.if.org Git - python/commitdiff
Issue #15501: Document exception classes in subprocess module.
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Thu, 9 Aug 2012 12:23:49 +0000 (15:23 +0300)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Thu, 9 Aug 2012 12:23:49 +0000 (15:23 +0300)
Initial patch by Anton Barkovsky.

Doc/library/subprocess.rst
Misc/ACKS

index 3aae13776221b516e31f8f79c60d82d81d60c724..1f7315922cd155391380c06f931eec3e97dbf29e 100644 (file)
@@ -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
index 39ba2a9be16dac98b8a92693fe69eb4c734fdb71..56d5765743494fd553c39af11aa527b9d1e076fd 100644 (file)
--- 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