diff options
Diffstat (limited to 'astroid/protocols.py')
-rw-r--r-- | astroid/protocols.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/astroid/protocols.py b/astroid/protocols.py index c3abc819..f19a9f41 100644 --- a/astroid/protocols.py +++ b/astroid/protocols.py @@ -514,6 +514,11 @@ def with_assigned_stmts(self, node=None, context=None, asspath=None): 'Tried to infer a nonexistent target with index {index} ' 'in {node!r}.', node=self, targets=node, assign_path=asspath, context=context)) + except TypeError: + util.reraise(exceptions.InferenceError( + 'Tried to unpack an non-iterable value ' + 'in {node!r}.', node=self, targets=node, + assign_path=asspath, context=context)) yield obj # Explicit StopIteration to return error information, see comment # in raise_if_nothing_inferred. |