diff options
| author | cpopa <devnull@localhost> | 2014-08-18 15:23:11 +0300 |
|---|---|---|
| committer | cpopa <devnull@localhost> | 2014-08-18 15:23:11 +0300 |
| commit | 93e71976377c537fc87a4ca1fbcedd4e6f597096 (patch) | |
| tree | 2a80fde98470e755a186faa8122cf5682c62a6e4 | |
| parent | fc3d7edd86a6ca68791fa53c08a94e39406bf7f8 (diff) | |
| download | pylint-93e71976377c537fc87a4ca1fbcedd4e6f597096.tar.gz | |
Check if the instance inherits from a standard exception before unproxying.
| -rw-r--r-- | checkers/exceptions.py | 2 |
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 |
