[Python-checkins] r69888 - python/branches/io-c/Modules/_iobase.c
antoine.pitrou
python-checkins at python.org
Mon Feb 23 00:03:21 CET 2009
Author: antoine.pitrou
Date: Mon Feb 23 00:03:16 2009
New Revision: 69888
Log:
Silence all exceptions when finalizing
Modified:
python/branches/io-c/Modules/_iobase.c
Modified: python/branches/io-c/Modules/_iobase.c
==============================================================================
--- python/branches/io-c/Modules/_iobase.c (original)
+++ python/branches/io-c/Modules/_iobase.c Mon Feb 23 00:03:16 2009
@@ -219,14 +219,16 @@
closed = PyObject_IsTrue(res);
Py_DECREF(res);
if (closed == -1)
- PyErr_WriteUnraisable(self);
+ PyErr_Clear();
}
if (closed == 0) {
res = PyObject_CallMethodObjArgs((PyObject *) self, _PyIO_str_close,
NULL);
- /* Silencing I/O errors is bad, so we print them out on the console. */
+ /* Silencing I/O errors is bad, but printing spurious tracebacks is
+ equally as bad, and potentially more frequent (because of
+ shutdown issues). */
if (res == NULL)
- PyErr_WriteUnraisable(self);
+ PyErr_Clear();
else
Py_DECREF(res);
}
More information about the Python-checkins
mailing list