diff options
author | Guido van Rossum <guido@python.org> | 1998-02-19 20:46:48 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-02-19 20:46:48 (GMT) |
commit | 3da3fcef961c4be22806d9d94df5f1d0f09dbbc7 (patch) | |
tree | f5812112443983852af87e6685e5103696c4f1e9 /Objects | |
parent | 9168328572fbb4c3369f3cb64370eeb970fd0728 (diff) | |
download | cpython-3da3fcef961c4be22806d9d94df5f1d0f09dbbc7.zip cpython-3da3fcef961c4be22806d9d94df5f1d0f09dbbc7.tar.gz cpython-3da3fcef961c4be22806d9d94df5f1d0f09dbbc7.tar.bz2 |
Check ferror(), not errno, for fread() error.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/fileobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index cd8a730..5502f15 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -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); |