aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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]))