From: Petteri Aimonen Date: Thu, 24 Oct 2013 06:52:40 +0000 (+0300) Subject: Same fix for EncodedSize.__mul__ X-Git-Tag: 3.99.1~14^2~334 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=86d698315608c372868bb55f6d2c609600ac8e41;p=apps%2Flow-level-can-service.git Same fix for EncodedSize.__mul__ --- diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index aa2c1b3..89647c2 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))