mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Check ferror(), not errno, for fread() error.
This commit is contained in:
parent
9168328572
commit
3da3fcef96
1 changed files with 1 additions and 1 deletions
|
@ -695,7 +695,7 @@ file_readlines(f, args)
|
|||
Py_END_ALLOW_THREADS
|
||||
if (nread == 0) {
|
||||
sizehint = 0;
|
||||
if (nread == 0)
|
||||
if (!ferror(f->f_fp))
|
||||
break;
|
||||
PyErr_SetFromErrno(PyExc_IOError);
|
||||
clearerr(f->f_fp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue