mirror of
https://github.com/python/cpython.git
synced 2024-11-28 12:31:14 +08:00
Check ferror(), not errno, for fread() error.
This commit is contained in:
parent
9168328572
commit
3da3fcef96
@ -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…
Reference in New Issue
Block a user