Revert "PEP 237 unified long integers and integers: http://www.python.org/dev/peps...
authorNils Gillmann <ng0@n0.is>
Thu, 17 May 2018 16:13:13 +0000 (16:13 +0000)
committerNils Gillmann <ng0@n0.is>
Thu, 17 May 2018 16:13:13 +0000 (16:13 +0000)
This reverts commit cb9b9edd88cb35f998e7d9dd9cd3f614189a582d.

Actually this is python3 only. A python2+3 variant must be used for now!

contrib/gnunet-chk.py.in

index c976b2143d4abe28f16565a9612b5d663f37761f..f20153a8af7300c4776d54237de12b50b90d1d83 100755 (executable)
@@ -192,9 +192,11 @@ class Chk:
     def setSize(self, size):
         self.fsize = size
 
+    # 2to3-3.5 suggests to change the code below to:
+    # if isinstance (self.fsize, int):
     def uri(self):
         sizestr = repr(self.fsize)
-        if isinstance(self.fsize, int):
+        if isinstance(self.fsize, long):
             sizestr = sizestr[:-1]
         return GNUNET_FS_URI_PREFIX + GNUNET_FS_URI_CHK_INFIX + \
             encode_data_to_string(bytearray(self.key)) + "." + \