Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 62192:a25ad9c4ace0
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).
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Tue, 08 Jun 2010 21:00:13 +0000 |
| parents | 815ba3872f85 |
| children | 72f774903772 |
line wrap: on
line diff
--- a/Python/pythonrun.c Tue Jun 08 20:57:52 2010 +0000 +++ b/Python/pythonrun.c Tue Jun 08 21:00:13 2010 +0000 @@ -2055,7 +2055,7 @@ 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 {
