mirror of https://github.com/python/cpython.git
Call clearerr() after EOF seen.
This commit is contained in:
parent
c7ec9c98e2
commit
76ad8ed51d
|
@ -311,6 +311,7 @@ getline(f, n)
|
|||
|
||||
for (;;) {
|
||||
if ((c = getc(fp)) == EOF) {
|
||||
clearerr(fp);
|
||||
if (intrcheck()) {
|
||||
DECREF(v);
|
||||
err_set(KeyboardInterrupt);
|
||||
|
|
Loading…
Reference in New Issue