summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/ceval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index c920d30..7c1d407 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1795,6 +1795,8 @@ eval_code2(co, globals, locals,
Python main loop. Don't do
this for 'finally'. */
if (b->b_type == SETUP_EXCEPT) {
+ PyErr_NormalizeException(
+ &exc, &val, &tb);
set_exc_info(tstate,
exc, val, tb);
}
@@ -1875,8 +1877,6 @@ set_exc_info(tstate, type, value, tb)
PyFrameObject *frame;
PyObject *tmp_type, *tmp_value, *tmp_tb;
- PyErr_NormalizeException(&type, &value, &tb);
-
frame = tstate->frame;
if (frame->f_exc_type == NULL) {
/* This frame didn't catch an exception before */