Skip to content

Commit 824ac88

Browse files
committed
Fix eager imports in try/except in global mode
1 parent 90246cc commit 824ac88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ _PyCompile_TopFBlock(compiler *c)
790790
bool
791791
_PyCompile_InExceptionHandler(compiler *c)
792792
{
793-
for (Py_ssize_t i = c->u->u_nfblocks; i < c->u->u_nfblocks; i++) {
793+
for (Py_ssize_t i = 0; i < c->u->u_nfblocks; i++) {
794794
fblockinfo *block = &c->u->u_fblock[i];
795795
switch (block->fb_type) {
796796
case COMPILE_FBLOCK_TRY_EXCEPT:

0 commit comments

Comments
 (0)