From cfd6467888c78fb86570564dfc2d373bf282e039 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sun, 21 Jul 2019 11:13:08 +0200 Subject: [PATCH] Minor ReST formatting fixes in subprocess docs --- Doc/library/subprocess.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 7e1e3f942c1c33..1e668dac74af79 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -1041,7 +1041,7 @@ calls these functions. Run the command described by *args*. Wait for command to complete, then return the :attr:`~Popen.returncode` attribute. - Code needing to capture stdout or stderr should use :func:`run` instead: + Code needing to capture stdout or stderr should use :func:`run` instead:: run(...).returncode @@ -1069,7 +1069,7 @@ calls these functions. :exc:`CalledProcessError` object will have the return code in the :attr:`~CalledProcessError.returncode` attribute. - Code needing to capture stdout or stderr should use :func:`run` instead: + Code needing to capture stdout or stderr should use :func:`run` instead:: run(..., check=True) @@ -1191,8 +1191,8 @@ becomes:: p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits. output = p2.communicate()[0] -The p1.stdout.close() call after starting the p2 is important in order for p1 -to receive a SIGPIPE if p2 exits before p1. +The ``p1.stdout.close()`` call after starting the p2 is important in order for +p1 to receive a SIGPIPE if p2 exits before p1. Alternatively, for trusted input, the shell's own pipeline support may still be used directly: