summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-08-08 20:46:42 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2010-08-08 20:46:42 +0000
commit9847d74fb7da263e9d1943d6c635656d54f44de6 (patch)
tree9bee4d98786a892cd7748921dbac9751d5723d46 /Python
parent1ba6c3dd8f19f0a25603c23988ea999594d1e27e (diff)
downloadcpython-9847d74fb7da263e9d1943d6c635656d54f44de6.tar.gz
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 79a19f8dd7..233fc16ea1 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);
}