aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Gillmann <ng0@n0.is>2018-05-17 14:23:45 +0000
committerNils Gillmann <ng0@n0.is>2018-05-17 14:23:45 +0000
commit847d61a0590037507e2dd6f7b06afffd1459edb3 (patch)
treeee9da5247c4428f75100e2a699dd5f0455c3a8c3
parent9f722a29b9f7abbb9d8d1de63a72d09588c02f91 (diff)
downloadgnunet-847d61a0590037507e2dd6f7b06afffd1459edb3.tar.gz
gnunet-847d61a0590037507e2dd6f7b06afffd1459edb3.zip
gnunet-chk.py: More 2to3 changes.
Signed-off-by: Nils Gillmann <ng0@n0.is>
-rwxr-xr-xcontrib/gnunet-chk.py.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/gnunet-chk.py.in b/contrib/gnunet-chk.py.in
index 0d07e6239..f20153a8a 100755
--- a/contrib/gnunet-chk.py.in
+++ b/contrib/gnunet-chk.py.in
@@ -192,6 +192,8 @@ 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):
195 def uri(self): 197 def uri(self):
196 sizestr = repr(self.fsize) 198 sizestr = repr(self.fsize)
197 if isinstance(self.fsize, long): 199 if isinstance(self.fsize, long):
@@ -367,7 +369,7 @@ Options:
367if '__main__' == __name__: 369if '__main__' == __name__:
368 try: 370 try:
369 opts, args = getopt.getopt(sys.argv[1:], "h", ["help"]) 371 opts, args = getopt.getopt(sys.argv[1:], "h", ["help"])
370 except getopt.GetoptError, err: 372 except getopt.GetoptError as err:
371 print(err) 373 print(err)
372 print("Exception occured") 374 print("Exception occured")
373 usage() 375 usage()
@@ -380,4 +382,4 @@ if '__main__' == __name__:
380 print("Incorrect number of arguments passed") 382 print("Incorrect number of arguments passed")
381 usage() 383 usage()
382 sys.exit(1) 384 sys.exit(1)
383 print chkuri_from_path(args[0]) 385 print(chkuri_from_path(args[0]))