summaryrefslogtreecommitdiff
path: root/checkers/exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'checkers/exceptions.py')
-rw-r--r--checkers/exceptions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/checkers/exceptions.py b/checkers/exceptions.py
index 175c77b2e..5bb07acc8 100644
--- a/checkers/exceptions.py
+++ b/checkers/exceptions.py
@@ -235,8 +235,8 @@ class ExceptionsChecker(BaseChecker):
# exception, by infering all the base classes and
# looking for inference errors
bases = infer_bases(exc)
- fully_infered = not any(inferit is YES
- for inferit in bases)
+ fully_infered = all(inferit is not YES
+ for inferit in bases)
if fully_infered:
self.add_message('catching-non-exception',
node=handler.type,