Same fix for EncodedSize.__mul__
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>
Thu, 24 Oct 2013 06:52:40 +0000 (09:52 +0300)
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>
Thu, 24 Oct 2013 06:52:40 +0000 (09:52 +0300)
generator/nanopb_generator.py

index aa2c1b3..89647c2 100755 (executable)
@@ -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))