diff options
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 61928e3..5a35524 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3090,7 +3090,10 @@ fast_block_end: Python main loop. */ PyErr_NormalizeException( &exc, &val, &tb); - PyException_SetTraceback(val, tb); + if (tb != NULL) + PyException_SetTraceback(val, tb); + else + PyException_SetTraceback(val, Py_None); Py_INCREF(exc); tstate->exc_type = exc; Py_INCREF(val); |