mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Issue #5319: Print an error if flushing stdout fails at interpreter
shutdown.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user