mirror of
https://github.com/python/cpython.git
synced 2025-07-13 22:35:18 +00:00
Issue #21425: Fix flushing of standard streams in the interactive interpreter.
This commit is contained in:
parent
3d1bc608a8
commit
9845c7ebc5
4 changed files with 57 additions and 4 deletions
|
@ -1444,12 +1444,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