summaryrefslogtreecommitdiff
path: root/pylint/checkers/variables.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/checkers/variables.py')
-rw-r--r--pylint/checkers/variables.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py
index 2504c0c84..2bd553fa1 100644
--- a/pylint/checkers/variables.py
+++ b/pylint/checkers/variables.py
@@ -950,6 +950,12 @@ scope_type : {self._atomic.scope_type}
return True
if isinstance(node, (nodes.ClassDef, nodes.FunctionDef)) and node.name == name:
return True
+ if (
+ isinstance(node, nodes.ExceptHandler)
+ and node.name
+ and node.name.name == name
+ ):
+ return True
return False
@staticmethod