summaryrefslogtreecommitdiff
path: root/pylint/checkers/refactoring.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/checkers/refactoring.py')
-rw-r--r--pylint/checkers/refactoring.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pylint/checkers/refactoring.py b/pylint/checkers/refactoring.py
index 28313439a..4fd988471 100644
--- a/pylint/checkers/refactoring.py
+++ b/pylint/checkers/refactoring.py
@@ -1170,7 +1170,7 @@ class RefactoringChecker(checkers.BaseTokenChecker):
#  to infer it.
return True
exc = utils.safe_infer(node.exc)
- if exc is None or exc is astroid.Uninferable:
+ if exc is None or exc is astroid.Uninferable or not hasattr(exc, "pytype"):
return False
exc_name = exc.pytype().split(".")[-1]
handlers = utils.get_exception_handlers(node, exc_name)