From 687ef6e70bf17f33d8fe0635dabb32ccc4cf4133 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 12 Jan 2000 16:28:58 +0000 Subject: On Linux, one sometimes sees spurious errors after interrupting previous output. Call clearerr() to prevent past errors affecting our ferror() test later, in PyObject_Print(). Suggested by Marc Lemburg. --- Objects/object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Objects/object.c b/Objects/object.c index b62477a..ee9c271 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -168,6 +168,7 @@ PyObject_Print(op, fp, flags) return -1; } #endif + clearerr(fp); /* Clear any previous error condition */ if (op == NULL) { fprintf(fp, ""); } -- cgit v0.12