diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-06-17 16:10:46 +0300 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-06-17 16:10:46 +0300 |
commit | a6863085d1ce484220a556b3fe8904ad59cf3367 (patch) | |
tree | 639298fd9f40932bf07911311996814a895e1c75 /pylint/checkers | |
parent | 2736a29078af333d38d860e7a590223ef7f80627 (diff) | |
download | pylint-a6863085d1ce484220a556b3fe8904ad59cf3367.tar.gz |
Emit no-member checks for nodes found in an ExceptHandler branch, without exception guarding.
Diffstat (limited to 'pylint/checkers')
-rw-r--r-- | pylint/checkers/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
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, |