From: Guido van Rossum Date: Wed, 12 Jan 2000 16:28:58 +0000 (+0000) Subject: On Linux, one sometimes sees spurious errors after interrupting X-Git-Tag: v1.6a1~557 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=687ef6e70bf17f33d8fe0635dabb32ccc4cf4133;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Objects/object.c b/Objects/object.c index b62477a812f3..ee9c27146b2a 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, ""); }