diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2014-05-11 11:43:31 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2014-05-11 11:43:31 (GMT) |
commit | 1c33280c9534180733c595de160919dd86e74659 (patch) | |
tree | 94634b5bead1da641297df511d5123911b43b303 /Python/pythonrun.c | |
parent | c89a451ae13339d803cad639f2c61af2c67f5fc2 (diff) | |
parent | 9845c7ebc5cf5af495123701664f275562f45243 (diff) | |
download | cpython-1c33280c9534180733c595de160919dd86e74659.zip cpython-1c33280c9534180733c595de160919dd86e74659.tar.gz cpython-1c33280c9534180733c595de160919dd86e74659.tar.bz2 |
Issue #21425: Fix flushing of standard streams in the interactive interpreter.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 4fd5149..b2d5464 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1453,12 +1453,13 @@ PyRun_InteractiveOneObject(FILE *fp, PyObject *filename, PyCompilerFlags *flags) d = PyModule_GetDict(m); v = run_mod(mod, filename, d, d, flags, arena); PyArena_Free(arena); - flush_io(); if (v == NULL) { PyErr_Print(); + flush_io(); return -1; } Py_DECREF(v); + flush_io(); return 0; } |