Skip to content

Commit c075f5b

Browse files
authored
Merge pull request python#18 from LazyImportsCabal/bad_global
Fix eager imports in try/except in global mode
2 parents 90246cc + 824ac88 commit c075f5b

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)