diff options
author | Nils Gillmann <ng0@n0.is> | 2018-05-17 16:27:27 +0000 |
---|---|---|
committer | Nils Gillmann <ng0@n0.is> | 2018-05-17 16:27:27 +0000 |
commit | 93d2f7aa829d921527efb92b10c12d64552e1f12 (patch) | |
tree | e232b24a1345916362b62467db15425a90ac3cf9 /contrib | |
parent | d9d4454b10201c1c1e0da7e95069dd073571beac (diff) | |
download | gnunet-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
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/gnunet-chk.py.in | 4 |
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)) + "." + \ |