summaryrefslogtreecommitdiffstats
path: root/Python/symtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 708e18c..d275cb9 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -1335,7 +1335,8 @@ symtable_visit_excepthandler(struct symtable *st, excepthandler_ty eh)
if (eh->type)
VISIT(st, expr, eh->type);
if (eh->name)
- VISIT(st, expr, eh->name);
+ if (!symtable_add_def(st, eh->name, DEF_LOCAL))
+ return 0;
VISIT_SEQ(st, stmt, eh->body);
return 1;
}