Py_FatalError(): don't sys sys.last_xxx variables

Call PyErr_PrintEx(0) instead of PyErr_Print() to avoid a crash if
Py_FatalError() is called in an early stage of Python initialization (if PySys
is not yet initialized).
This commit is contained in:
Victor Stinner 2010-06-08 21:00:13 +00:00
parent 9b7e2d1e54
commit 55a5c78e4d
1 changed files with 1 additions and 1 deletions

View File

@ -2055,7 +2055,7 @@ Py_FatalError(const char *msg)
fprintf(stderr, "Fatal Python error: %s\n", msg);
fflush(stderr); /* it helps in Windows debug build */
if (PyErr_Occurred()) {
PyErr_Print();
PyErr_PrintEx(0);
}
#ifdef MS_WINDOWS
{