diff options
author | Hynek Schlawack <hs@ox.cx> | 2012-06-22 07:32:22 (GMT) |
---|---|---|
committer | Hynek Schlawack <hs@ox.cx> | 2012-06-22 07:32:22 (GMT) |
commit | 7f59fd7c7c3315c52034b09ffadeb974bc112b5d (patch) | |
tree | 6d2957912a697a455d75dc5bdc67b20c5c194566 /Modules/_io | |
parent | 76935b9c8cc083f4d00bee3b8f0c76054dd31013 (diff) | |
download | cpython-7f59fd7c7c3315c52034b09ffadeb974bc112b5d.zip cpython-7f59fd7c7c3315c52034b09ffadeb974bc112b5d.tar.gz cpython-7f59fd7c7c3315c52034b09ffadeb974bc112b5d.tar.bz2 |
Simplify code in fileio_init
If an identical code line is in both at the end of if and else, it can as well
stand after the block. :) The code is from 464cf523485e, I didn't see it before
checking the commits in the web interface of course.
Diffstat (limited to 'Modules/_io')
-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) |