Skip to content

Commit 90fdbe0

Browse files
committed
Remove overactive assert
1 parent a7e2dc9 commit 90fdbe0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Objects/genobject.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,6 @@ _gen_throw(PyGenObject *gen, int close_on_genexit,
468468
PyObject *yf = _PyGen_yf(gen);
469469

470470
if (yf) {
471-
assert(exc_context == NULL);
472471
_PyInterpreterFrame *frame = &gen->gi_iframe;
473472
PyObject *ret;
474473
int err;
@@ -504,7 +503,7 @@ _gen_throw(PyGenObject *gen, int close_on_genexit,
504503
PyFrameState state = gen->gi_frame_state;
505504
gen->gi_frame_state = FRAME_EXECUTING;
506505
ret = _gen_throw((PyGenObject *)yf, close_on_genexit,
507-
typ, val, tb, NULL);
506+
typ, val, tb, exc_context);
508507
gen->gi_frame_state = state;
509508
tstate->current_frame = prev;
510509
frame->previous = NULL;

0 commit comments

Comments
 (0)