summaryrefslogtreecommitdiffstats
path: root/Modules/_io/iobase.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_io/iobase.c')
-rw-r--r--Modules/_io/iobase.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
index 271a41e..2d664ab 100644
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -183,11 +183,7 @@ iobase_close(PyObject *self, PyObject *args)
res = PyObject_CallMethodObjArgs(self, _PyIO_str_flush, NULL);
PyObject_SetAttrString(self, "__IOBase_closed", Py_True);
if (res == NULL) {
- /* If flush() fails, just give up */
- if (PyErr_ExceptionMatches(PyExc_IOError))
- PyErr_Clear();
- else
- return NULL;
+ return NULL;
}
Py_XDECREF(res);
Py_RETURN_NONE;