summaryrefslogtreecommitdiff
path: root/checkers/exceptions.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2014-08-18 15:13:34 +0300
committerClaudiu Popa <pcmanticore@gmail.com>2014-08-18 15:13:34 +0300
commitec6f95da424cbcb38e2ca76bec010050f9f4f697 (patch)
treec6daac5b12ee77a144cd36a42f2ea726e4439cb7 /checkers/exceptions.py
parentc5e53814053cb7495fb3fdf005b34d44575ad724 (diff)
downloadpylint-git-ec6f95da424cbcb38e2ca76bec010050f9f4f697.tar.gz
Unproxy the infered instances.
Diffstat (limited to 'checkers/exceptions.py')
-rw-r--r--checkers/exceptions.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/checkers/exceptions.py b/checkers/exceptions.py
index ecbf4a416..0142d9a55 100644
--- a/checkers/exceptions.py
+++ b/checkers/exceptions.py
@@ -291,6 +291,8 @@ class ExceptionsChecker(BaseChecker):
for part, exc in excs:
if exc is YES:
continue
+ if isinstance(exc, astroid.Instance):
+ exc = exc._proxied
if not isinstance(exc, astroid.Class):
# Don't emit the warning if the infered stmt
# is None, but the exception handler is something else,