Commit 0451b0bc authored by Guido van Rossum's avatar Guido van Rossum

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.
parent 19eb4a20
......@@ -168,6 +168,7 @@ PyObject_Print(op, fp, flags)
return -1;
}
#endif
clearerr(fp); /* Clear any previous error condition */
if (op == NULL) {
fprintf(fp, "<nil>");
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment