The error detection code in FileIO.close() could fail to reflect the `errno` value, and report it as -1 instead.
diff --git a/Modules/_fileio.c b/Modules/_fileio.c
index fd35d69..32f6790 100644
--- a/Modules/_fileio.c
+++ b/Modules/_fileio.c
@@ -97,10 +97,8 @@
 		Py_RETURN_NONE;
 	}
 	errno = internal_close(self);
-	if (errno < 0) {
-		PyErr_SetFromErrno(PyExc_IOError);
+	if (errno < 0)
 		return NULL;
-	}
 
 	return PyObject_CallMethod((PyObject*)&PyRawIOBase_Type,
 				   "close", "O", self);