Merged revisions 80720 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80720 | antoine.pitrou | 2010-05-03 18:25:33 +0200 (lun., 03 mai 2010) | 5 lines
Issue #7865: The close() method of :mod:`io` objects should not swallow
exceptions raised by the implicit flush(). Also ensure that calling
close() several times is supported. Patch by Pascal Chambon.
........
diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c
index 1482d82..4e78cd5 100644
--- a/Modules/_io/bytesio.c
+++ b/Modules/_io/bytesio.c
@@ -169,6 +169,7 @@
static PyObject *
bytesio_flush(bytesio *self)
{
+ CHECK_CLOSED(self);
Py_RETURN_NONE;
}