(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.
This commit is contained in:
Victor Stinner 2014-07-02 23:00:38 +02:00
commit 6680e9f5fd
2 changed files with 5 additions and 2 deletions

View File

@ -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.

View File

@ -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;
}