diff options
Diffstat (limited to 'Modules/_io/fileio.c')
-rw-r--r-- | Modules/_io/fileio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index 31e2994..226a5d2 100644 --- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c @@ -377,7 +377,6 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds) #endif self->fd = open(name, flags, 0666); Py_END_ALLOW_THREADS - fd_is_own = 1; } else { PyObject *fdobj = PyObject_CallFunction( opener, "Oi", nameobj, flags); @@ -395,9 +394,9 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds) if (self->fd == -1) { goto error; } - fd_is_own = 1; } + fd_is_own = 1; if (self->fd < 0) { #ifdef MS_WINDOWS if (widename != NULL) |