mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
Issue #21425: Fix flushing of standard streams in the interactive interpreter.
This commit is contained in:
commit
1c33280c95
4 changed files with 56 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue