mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
Issue #5319: Print an error if flushing stdout fails at interpreter
shutdown.
This commit is contained in:
parent
c17f17294f
commit
bddc9fe22b
2 changed files with 4 additions and 1 deletions
|
@ -320,7 +320,7 @@ flush_std_files(void)
|
|||
if (fout != NULL && fout != Py_None) {
|
||||
tmp = PyObject_CallMethod(fout, "flush", "");
|
||||
if (tmp == NULL)
|
||||
PyErr_Clear();
|
||||
PyErr_WriteUnraisable(fout);
|
||||
else
|
||||
Py_DECREF(tmp);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue