summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-08-08 20:46:42 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-08-08 20:46:42 (GMT)
commitbddc9fe22bb5d78bfb3db891d3b2d56d963f6e04 (patch)
tree288b4befeda79e4e2c81c06200f712f3d8ffd952 /Python
parentc17f17294fb31967b52b5b7039d7587e0f82c3bb (diff)
downloadcpython-bddc9fe22bb5d78bfb3db891d3b2d56d963f6e04.zip
cpython-bddc9fe22bb5d78bfb3db891d3b2d56d963f6e04.tar.gz
cpython-bddc9fe22bb5d78bfb3db891d3b2d56d963f6e04.tar.bz2
Issue #5319: Print an error if flushing stdout fails at interpreter
shutdown.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 79a19f8..233fc16 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -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);
}