summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-06-08 21:00:13 +0000
committerVictor Stinner <victor.stinner@haypocalc.com>2010-06-08 21:00:13 +0000
commitbb4e6d2cdb19b9ad4d8439844127032223299b8f (patch)
tree33d0048e9b1ef6bf79f3d2d7e1125e4498da65bf /Python/pythonrun.c
parent94c10f411f46fc487be91570768a3c9b78b46574 (diff)
downloadcpython-bb4e6d2cdb19b9ad4d8439844127032223299b8f.tar.gz
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).
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 1581c90fb3..05a980085d 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -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
{