Commits

Andrew Svetlov  committed 1e8f6d8 Draft

Issue #15501: Document exception classes in subprocess module.

Initial patch by Anton Barkovsky.

  • Participants
  • Parent commits 3f42c9d
  • Branches 3.2

Comments (0)

Files changed (2)

File Doc/library/subprocess.rst

    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
 Michael J. Barber
 Nicolas Bareil
 Chris Barker
+Anton Barkovsky
 Nick Barnes
 Quentin Barnes
 Richard Barran