Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e10920f

Browse files
committed
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.
1 parent ee750d8 commit e10920f

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Core and Builtins
2727
Library
2828
-------
2929

30+
- Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before,
31+
it ignored I/O errors if at least the first C call read() succeed.
32+
3033
- Issue #21781: ssl.RAND_add() now supports strings longer than 2 GB.
3134

3235
- Issue #11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper

Modules/_io/fileio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,9 +691,9 @@ fileio_readall(fileio *self)
691691
}
692692
continue;
693693
}
694-
if (bytes_read > 0)
695-
break;
696694
if (errno == EAGAIN) {
695+
if (bytes_read > 0)
696+
break;
697697
Py_DECREF(result);
698698
Py_RETURN_NONE;
699699
}

0 commit comments

Comments
 (0)