summaryrefslogtreecommitdiff
path: root/pylint/checkers/utils.py
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2015-06-17 16:10:46 +0300
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2015-06-17 16:10:46 +0300
commita6863085d1ce484220a556b3fe8904ad59cf3367 (patch)
tree639298fd9f40932bf07911311996814a895e1c75 /pylint/checkers/utils.py
parent2736a29078af333d38d860e7a590223ef7f80627 (diff)
downloadpylint-a6863085d1ce484220a556b3fe8904ad59cf3367.tar.gz
Emit no-member checks for nodes found in an ExceptHandler branch, without exception guarding.
Diffstat (limited to 'pylint/checkers/utils.py')
-rw-r--r--pylint/checkers/utils.py3
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,