From a6863085d1ce484220a556b3fe8904ad59cf3367 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Wed, 17 Jun 2015 16:10:46 +0300 Subject: Emit no-member checks for nodes found in an ExceptHandler branch, without exception guarding. --- pylint/checkers/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pylint/checkers') diff --git a/pylint/checkers/utils.py b/pylint/checkers/utils.py index af0b0ea..9416785 100644 --- a/pylint/checkers/utils.py +++ b/pylint/checkers/utils.py @@ -612,7 +612,8 @@ def node_ignores_exception(node, exception): or by a bare except clause. """ current = node - while current and not isinstance(current.parent, astroid.TryExcept): + ignores = (astroid.ExceptHandler, astroid.TryExcept) + while current and not isinstance(current.parent, ignores): current = current.parent func = functools.partial(error_of_type, -- cgit v1.2.1