summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-05-12 21:25:09 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-05-12 21:25:09 (GMT)
commitb0539b27d9a195b78a5713cc3d4aa98ea07dbc53 (patch)
tree7788aad4b799cbc5ca34b9b5de6838f32d728c3d /Doc
parent7fe1049fcbb623609c79c8f9ecc8e5ffc7cf6439 (diff)
downloadcpython-b0539b27d9a195b78a5713cc3d4aa98ea07dbc53.zip
cpython-b0539b27d9a195b78a5713cc3d4aa98ea07dbc53.tar.gz
cpython-b0539b27d9a195b78a5713cc3d4aa98ea07dbc53.tar.bz2
Issue #21485: remove unnecesary .flush() calls in the asyncio subprocess code
example
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/asyncio-subprocess.rst4
1 files changed, 1 insertions, 3 deletions
diff --git a/Doc/library/asyncio-subprocess.rst b/Doc/library/asyncio-subprocess.rst
index 5b4ede6..dc48eb5 100644
--- a/Doc/library/asyncio-subprocess.rst
+++ b/Doc/library/asyncio-subprocess.rst
@@ -262,9 +262,7 @@ display the output::
stdout = stdout.decode('ascii').rstrip()
print("Platform: %s" % stdout)
else:
- print("Python failed with exit code %s:" % exitcode)
- sys.stdout.flush()
- sys.stdout.buffer.flush()
+ print("Python failed with exit code %s:" % exitcode, flush=True)
sys.stdout.buffer.write(stdout)
sys.stdout.buffer.flush()
loop.close()