aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorNils Gillmann <ng0@n0.is>2018-05-17 16:10:30 +0000
committerNils Gillmann <ng0@n0.is>2018-05-17 16:10:30 +0000
commitcb9b9edd88cb35f998e7d9dd9cd3f614189a582d (patch)
treee232b24a1345916362b62467db15425a90ac3cf9 /contrib
parent2e7428c27e435b378d2c424b34765dd4726d5179 (diff)
downloadgnunet-cb9b9edd88cb35f998e7d9dd9cd3f614189a582d.tar.gz
gnunet-cb9b9edd88cb35f998e7d9dd9cd3f614189a582d.zip
PEP 237 unified long integers and integers: http://www.python.org/dev/peps/pep-0237/
Signed-off-by: Nils Gillmann <ng0@n0.is>
Diffstat (limited to 'contrib')
-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)) + "." + \