summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-06-03 10:54:55 +0000
committerGuido van Rossum <guido@python.org>1991-06-03 10:54:55 +0000
commit76ad8ed51d58faa1ab735dbc00e28a3e9ba35883 (patch)
treed0f31dc3c2ea6655bac132510269e1057c8ae4de
parentc7ec9c98e21b2b0da29e14975683f73a09321c18 (diff)
downloadcpython-git-76ad8ed51d58faa1ab735dbc00e28a3e9ba35883.tar.gz
Call clearerr() after EOF seen.
-rw-r--r--Objects/fileobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 495737e968..e6461a14d5 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -311,6 +311,7 @@ getline(f, n)
for (;;) {
if ((c = getc(fp)) == EOF) {
+ clearerr(fp);
if (intrcheck()) {
DECREF(v);
err_set(KeyboardInterrupt);