]> granicus.if.org Git - python/commitdiff
Merged revisions 83854 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 8 Aug 2010 20:49:19 +0000 (20:49 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 8 Aug 2010 20:49:19 +0000 (20:49 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83854 | antoine.pitrou | 2010-08-08 22:46:42 +0200 (dim., 08 août 2010) | 4 lines

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

Misc/NEWS
Python/pythonrun.c

index 5670f0d14612b0dd243bb873510e79b5217db6ca..ede4f041d614fea13155a3d8b701943f1450ede5 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@ What's New in Python 3.1.3?
 Core and Builtins
 -----------------
 
+- Issue #5319: Print an error if flushing stdout fails at interpreter
+  shutdown.
+
 - Issue #6869: Fix a refcount problem in the _ctypes extension.
 
 - Issue #5504: ctypes should now work with systems where mmap can't
index 388676589cde9fa3953cd4d76b79fde71270180f..84d72f071401bf0efdb54c241e36a47df37bd3ba 100644 (file)
@@ -331,7 +331,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);
     }