diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2014-07-02 21:00:38 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2014-07-02 21:00:38 (GMT) |
| commit | 6680e9f5fd1015ec7630c7658b5fdcce93114ab4 (patch) | |
| tree | a594b6d2cf782e4d8a2925684866bf10034f5735 | |
| parent | 7c45632f6dc442168d68810821e921ee1fe7f5b4 (diff) | |
| parent | e10920f0d1009ea33ce4b35b015a928b33a80867 (diff) | |
| download | cpython-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.
| -rw-r--r-- | Misc/NEWS | 3 | ||||
| -rw-r--r-- | Modules/_io/fileio.c | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -103,6 +103,9 @@ Core and Builtins Library ------- +- 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. + - Issue #5800: headers parameter of wsgiref.headers.Headers is now optional. Initial patch by Pablo Torres Navarrete and SilentGhost. 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; } |
