Issue #5319: Print an error if flushing stdout fails at interpreter

shutdown.
This commit is contained in:
Antoine Pitrou 2010-08-08 20:46:42 +00:00
parent c17f17294f
commit bddc9fe22b
2 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,9 @@ What's New in Python 3.2 Alpha 2?
Core and Builtins
-----------------
- Issue #5319: Print an error if flushing stdout fails at interpreter
shutdown.
- Issue #9337: The str() of a float or complex number is now identical
to its repr().

View File

@ -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);
}