diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pythonrun.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 7499429..b915c06 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1031,6 +1031,7 @@ error: void _PyErr_Display(PyObject *file, PyObject *unused, PyObject *value, PyObject *tb) { + assert(value != NULL); assert(file != NULL && file != Py_None); if (PyExceptionInstance_Check(value) && tb != NULL && PyTraceBack_Check(tb)) { @@ -1047,10 +1048,6 @@ _PyErr_Display(PyObject *file, PyObject *unused, PyObject *value, PyObject *tb) int unhandled_keyboard_interrupt = _PyRuntime.signals.unhandled_keyboard_interrupt; - if (!value || PyErr_GivenExceptionMatches(value, PyExc_MemoryError)) { - goto fallback; - } - // Try first with the stdlib traceback module PyObject *traceback_module = PyImport_ImportModule("traceback"); |