summaryrefslogtreecommitdiff
path: root/protocols.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-06-14 14:08:50 +0200
committerEmile Anclin <emile.anclin@logilab.fr>2010-06-14 14:08:50 +0200
commitfd8a5e4c8b7121b2e054d191779043d6ab7f34d0 (patch)
tree3d165a37d83221f216a4e0784eae3d4e1d6d45b6 /protocols.py
parentee38728de2375ed2cf04ec6b344c2ca85da07505 (diff)
downloadastroid-git-fd8a5e4c8b7121b2e054d191779043d6ab7f34d0.tar.gz
[fix] yield YES on multiplication of tuple/list with non valid operand
--HG-- branch : stable
Diffstat (limited to 'protocols.py')
-rw-r--r--protocols.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols.py b/protocols.py
index e1e2fb4d..22163b58 100644
--- a/protocols.py
+++ b/protocols.py
@@ -128,6 +128,9 @@ def tl_infer_binary_op(self, operator, other, context):
node.elts = elts
yield node
elif isinstance(other, nodes.Const) and operator == '*':
+ if not isinstance(other.value, int):
+ yield YES
+ continue
node = self.__class__()
elts = [n for elt in self.elts for n in elt.infer(context)
if not n is YES] * other.value