diff options
| -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 |
