diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_io/fileio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index 473919b..0fce1a3 100644 --- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c @@ -536,6 +536,8 @@ fileio_readall(fileio *self) Py_ssize_t total = 0; int n; + if (self->fd < 0) + return err_closed(); if (!_PyVerify_fd(self->fd)) return PyErr_SetFromErrno(PyExc_IOError); |