diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2014-05-12 23:25:25 +0200 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2014-05-12 23:25:25 +0200 |
| commit | 933da8efb7987f0bb7fac733d82d48eb65bc84a2 (patch) | |
| tree | bda75ae0c778e984645330f12ef4b25681e6da34 | |
| parent | 66113bb74a37e882181ba5c7db091c30c5c7693e (diff) | |
| parent | b0539b27d9a195b78a5713cc3d4aa98ea07dbc53 (diff) | |
| download | cpython-git-933da8efb7987f0bb7fac733d82d48eb65bc84a2.tar.gz | |
(Merge 3.4) Issue #21485: remove unnecesary .flush() calls in the asyncio
subprocess code example
| -rw-r--r-- | Doc/library/asyncio-subprocess.rst | 4 |
1 files changed, 1 insertions, 3 deletions
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() |
