commit | 9845c7ebc5cf5af495123701664f275562f45243 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Sun May 11 13:42:17 2014 +0200 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Sun May 11 13:42:17 2014 +0200 |
tree | c0c52f85ae3cd6fb4862b34f74cc213d4d610626 | |
parent | 3d1bc608a842b375eb7921d57e417f2dfaa5b71e [diff] [blame] |
Issue #21425: Fix flushing of standard streams in the interactive interpreter.
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index b3991ea..0327830 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c
@@ -1444,12 +1444,13 @@ 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; }