From fc3d7edd86a6ca68791fa53c08a94e39406bf7f8 Mon Sep 17 00:00:00 2001 From: cpopa Date: Mon, 18 Aug 2014 15:13:34 +0300 Subject: Unproxy the infered instances. --- checkers/exceptions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/checkers/exceptions.py b/checkers/exceptions.py index ecbf4a4..0142d9a 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, -- cgit v1.2.1