changeset: 91525:652b62213072 branch: 3.4 parent: 91520:34ec73494e74 user: Victor Stinner date: Wed Jul 02 22:59:31 2014 +0200 files: Misc/NEWS Modules/_io/fileio.c description: 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. diff -r 34ec73494e74 -r 652b62213072 Misc/NEWS --- a/Misc/NEWS Wed Jul 02 07:21:03 2014 +0300 +++ b/Misc/NEWS Wed Jul 02 22:59:31 2014 +0200 @@ -27,6 +27,9 @@ 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 #21781: ssl.RAND_add() now supports strings longer than 2 GB. - Issue #11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper diff -r 34ec73494e74 -r 652b62213072 Modules/_io/fileio.c --- a/Modules/_io/fileio.c Wed Jul 02 07:21:03 2014 +0300 +++ b/Modules/_io/fileio.c Wed Jul 02 22:59:31 2014 +0200 @@ -691,9 +691,9 @@ } continue; } - if (bytes_read > 0) - break; if (errno == EAGAIN) { + if (bytes_read > 0) + break; Py_DECREF(result); Py_RETURN_NONE; }