(Basically, the error is cleared... Like almost everywhere else...)
return;
if (PyErr_GivenExceptionMatches(exception, PyExc_SystemExit)) {
- err = Py_FlushLine();
+ if (Py_FlushLine())
+ PyErr_Clear();
fflush(stdout);
if (v == NULL || v == Py_None)
Py_Exit(0);
if (f == NULL)
fprintf(stderr, "lost sys.stderr\n");
else {
- err = Py_FlushLine();
+ if (Py_FlushLine())
+ PyErr_Clear();
fflush(stdout);
- if (err == 0)
- err = PyTraceBack_Print(tb, f);
+ err = PyTraceBack_Print(tb, f);
if (err == 0 &&
PyErr_GivenExceptionMatches(exception, PyExc_SyntaxError))
{
Py_DECREF(exitfunc);
}
- Py_FlushLine();
+ if (Py_FlushLine())
+ PyErr_Clear();
}
static void