diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2018-06-15 09:22:19 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-06-15 09:22:19 +0200 |
commit | fab4f207d48570e941a1df4b6441ba2ca12efbe5 (patch) | |
tree | 70f86a95cda4890800ffe663601d53b137e5d9a0 /astroid/protocols.py | |
parent | d68a8cabc071c44608a97d08ff736ccfea96711d (diff) | |
download | astroid-git-fab4f207d48570e941a1df4b6441ba2ca12efbe5.tar.gz |
The exception should be IndexError, not KeyError, since items is a list
Diffstat (limited to 'astroid/protocols.py')
-rw-r--r-- | astroid/protocols.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/astroid/protocols.py b/astroid/protocols.py index 08d3b7a4..68d61e97 100644 --- a/astroid/protocols.py +++ b/astroid/protocols.py @@ -378,7 +378,7 @@ def _resolve_asspart(parts, asspath, context): # A dictionary in an iterating context try: assigned, _ = part.items[index] - except KeyError: + except IndexError: return elif hasattr(part, 'getitem'): |