aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Gillmann <ng0@n0.is>2018-05-17 16:27:27 +0000
committerNils Gillmann <ng0@n0.is>2018-05-17 16:27:27 +0000
commit93d2f7aa829d921527efb92b10c12d64552e1f12 (patch)
treee232b24a1345916362b62467db15425a90ac3cf9
parentd9d4454b10201c1c1e0da7e95069dd073571beac (diff)
downloadgnunet-93d2f7aa829d921527efb92b10c12d64552e1f12.tar.gz
gnunet-93d2f7aa829d921527efb92b10c12d64552e1f12.zip
Revert "Revert "PEP 237 unified long integers and integers: http://www.python.org/dev/peps/pep-0237/""
This reverts commit d9d4454b10201c1c1e0da7e95069dd073571beac. Actually this is valid for python >= 2.2 and 3.x
-rwxr-xr-xcontrib/gnunet-chk.py.in4
1 files changed, 1 insertions, 3 deletions
diff --git a/contrib/gnunet-chk.py.in b/contrib/gnunet-chk.py.in
index f20153a8a..c976b2143 100755
--- a/contrib/gnunet-chk.py.in
+++ b/contrib/gnunet-chk.py.in
@@ -192,11 +192,9 @@ class Chk:
192 def setSize(self, size): 192 def setSize(self, size):
193 self.fsize = size 193 self.fsize = size
194 194
195 # 2to3-3.5 suggests to change the code below to:
196 # if isinstance (self.fsize, int):
197 def uri(self): 195 def uri(self):
198 sizestr = repr(self.fsize) 196 sizestr = repr(self.fsize)
199 if isinstance(self.fsize, long): 197 if isinstance(self.fsize, int):
200 sizestr = sizestr[:-1] 198 sizestr = sizestr[:-1]
201 return GNUNET_FS_URI_PREFIX + GNUNET_FS_URI_CHK_INFIX + \ 199 return GNUNET_FS_URI_PREFIX + GNUNET_FS_URI_CHK_INFIX + \
202 encode_data_to_string(bytearray(self.key)) + "." + \ 200 encode_data_to_string(bytearray(self.key)) + "." + \