summaryrefslogtreecommitdiffstats
path: root/Modules/_io
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-02 21:00:38 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-07-02 21:00:38 (GMT)
commit6680e9f5fd1015ec7630c7658b5fdcce93114ab4 (patch)
treea594b6d2cf782e4d8a2925684866bf10034f5735 /Modules/_io
parent7c45632f6dc442168d68810821e921ee1fe7f5b4 (diff)
parente10920f0d1009ea33ce4b35b015a928b33a80867 (diff)
downloadcpython-6680e9f5fd1015ec7630c7658b5fdcce93114ab4.zip
cpython-6680e9f5fd1015ec7630c7658b5fdcce93114ab4.tar.gz
cpython-6680e9f5fd1015ec7630c7658b5fdcce93114ab4.tar.bz2
(Merge 3.4) Issue #21090: io.FileIO.readall() does not ignore I/O errors
anymore. Before, it ignored I/O errors if at least the first C call read() succeed.
Diffstat (limited to 'Modules/_io')
-rw-r--r--Modules/_io/fileio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index 038b2c6..280523b 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -694,9 +694,9 @@ fileio_readall(fileio *self)
}
continue;
}
- if (bytes_read > 0)
- break;
if (errno == EAGAIN) {
+ if (bytes_read > 0)
+ break;
Py_DECREF(result);
Py_RETURN_NONE;
}