diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-06-08 21:00:13 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-06-08 21:00:13 (GMT) |
commit | 55a5c78e4dc4393ef0c57602775db2d3d704be36 (patch) | |
tree | 5cc44e273910a510e62b1577cd6845270174a180 /Python | |
parent | 9b7e2d1e542ccecd031818229773d7836c437992 (diff) | |
download | cpython-55a5c78e4dc4393ef0c57602775db2d3d704be36.zip cpython-55a5c78e4dc4393ef0c57602775db2d3d704be36.tar.gz cpython-55a5c78e4dc4393ef0c57602775db2d3d704be36.tar.bz2 |
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')
-rw-r--r-- | Python/pythonrun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 1581c90..05a9800 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 { |