From 86d698315608c372868bb55f6d2c609600ac8e41 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Thu, 24 Oct 2013 09:52:40 +0300 Subject: Same fix for EncodedSize.__mul__ --- generator/nanopb_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'generator/nanopb_generator.py') diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index aa2c1b38..89647c2c 100755 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -115,7 +115,7 @@ class EncodedSize: raise ValueError("Cannot add size: " + repr(other)) def __mul__(self, other): - if isinstance(other, int): + if isinstance(other, (int, long)): return EncodedSize(self.value * other, [str(other) + '*' + s for s in self.symbols]) else: raise ValueError("Cannot multiply size: " + repr(other)) -- cgit 1.2.3-korg