From: Victor Stinner Date: Mon, 12 May 2014 21:25:09 +0000 (+0200) Subject: Issue #21485: remove unnecesary .flush() calls in the asyncio subprocess code X-Git-Tag: v3.5.0a1~1673^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0539b27d9a195b78a5713cc3d4aa98ea07dbc53;p=python Issue #21485: remove unnecesary .flush() calls in the asyncio subprocess code example --- diff --git a/Doc/library/asyncio-subprocess.rst b/Doc/library/asyncio-subprocess.rst index 5b4ede61f6..dc48eb53e5 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()