summaryrefslogtreecommitdiff
path: root/astroid/protocols.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2016-12-03 14:45:56 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2016-12-03 14:45:56 +0200
commiteb9642ffeeab679b952e785be88916a450d317f7 (patch)
tree1d4f51deb400141c029fbc3915ac0944832b3df8 /astroid/protocols.py
parentac3e82e9bd8678086325a71a927a06bbc43d415e (diff)
downloadastroid-git-eb9642ffeeab679b952e785be88916a450d317f7.tar.gz
Let the type error propagate as an AstroidTypeError.
Diffstat (limited to 'astroid/protocols.py')
-rw-r--r--astroid/protocols.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/astroid/protocols.py b/astroid/protocols.py
index 93ec7a61..73954fb6 100644
--- a/astroid/protocols.py
+++ b/astroid/protocols.py
@@ -219,9 +219,9 @@ def _resolve_looppart(parts, asspath, context):
index_node = nodes.Const(index)
try:
assigned = stmt.getitem(index_node, context)
- except (AttributeError, IndexError):
- continue
- except TypeError: # stmt is unsubscriptable Const
+ except (AttributeError,
+ exceptions.AstroidTypeError,
+ exceptions.AstroidIndexError):
continue
if not asspath:
# we achieved to resolved the assignment path,
@@ -370,7 +370,7 @@ def _resolve_asspart(parts, asspath, context):
assigned = part.getitem(index_node, context)
# XXX raise a specific exception to avoid potential hiding of
# unexpected exception ?
- except (TypeError, IndexError):
+ except (exceptions.AstroidTypeError, exceptions.AstroidIndexError):
return
if not asspath:
# we achieved to resolved the assignment path, don't infer the