summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-06-03 10:54:55 (GMT)
committerGuido van Rossum <guido@python.org>1991-06-03 10:54:55 (GMT)
commit76ad8ed51d58faa1ab735dbc00e28a3e9ba35883 (patch)
treed0f31dc3c2ea6655bac132510269e1057c8ae4de /Objects
parentc7ec9c98e21b2b0da29e14975683f73a09321c18 (diff)
downloadcpython-76ad8ed51d58faa1ab735dbc00e28a3e9ba35883.zip
cpython-76ad8ed51d58faa1ab735dbc00e28a3e9ba35883.tar.gz
cpython-76ad8ed51d58faa1ab735dbc00e28a3e9ba35883.tar.bz2
Call clearerr() after EOF seen.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/fileobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 495737e..e6461a1 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);