summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcpopa <devnull@localhost>2014-08-18 15:23:11 +0300
committercpopa <devnull@localhost>2014-08-18 15:23:11 +0300
commit93e71976377c537fc87a4ca1fbcedd4e6f597096 (patch)
tree2a80fde98470e755a186faa8122cf5682c62a6e4
parentfc3d7edd86a6ca68791fa53c08a94e39406bf7f8 (diff)
downloadpylint-93e71976377c537fc87a4ca1fbcedd4e6f597096.tar.gz
Check if the instance inherits from a standard exception before unproxying.
-rw-r--r--checkers/exceptions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/checkers/exceptions.py b/checkers/exceptions.py
index 0142d9a..cd78719 100644
--- a/checkers/exceptions.py
+++ b/checkers/exceptions.py
@@ -291,7 +291,7 @@ class ExceptionsChecker(BaseChecker):
for part, exc in excs:
if exc is YES:
continue
- if isinstance(exc, astroid.Instance):
+ if isinstance(exc, astroid.Instance) and inherit_from_std_ex(exc):
exc = exc._proxied
if not isinstance(exc, astroid.Class):
# Don't emit the warning if the infered stmt