gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: gnunet-chk.py: More 2to3 ch


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: gnunet-chk.py: More 2to3 changes.
Date: Thu, 17 May 2018 16:23:30 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 847d61a05 gnunet-chk.py: More 2to3 changes.
847d61a05 is described below

commit 847d61a0590037507e2dd6f7b06afffd1459edb3
Author: Nils Gillmann <address@hidden>
AuthorDate: Thu May 17 14:23:45 2018 +0000

    gnunet-chk.py: More 2to3 changes.
    
    Signed-off-by: Nils Gillmann <address@hidden>
---
 contrib/gnunet-chk.py.in | 6 ++++--
 1 file 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:
     def setSize(self, size):
         self.fsize = size
 
+    # 2to3-3.5 suggests to change the code below to:
+    # if isinstance (self.fsize, int):
     def uri(self):
         sizestr = repr(self.fsize)
         if isinstance(self.fsize, long):
@@ -367,7 +369,7 @@ Options:
 if '__main__' == __name__:
     try:
         opts, args = getopt.getopt(sys.argv[1:], "h", ["help"])
-    except getopt.GetoptError, err:
+    except getopt.GetoptError as err:
         print(err)
         print("Exception occured")
         usage()
@@ -380,4 +382,4 @@ if '__main__' == __name__:
         print("Incorrect number of arguments passed")
         usage()
         sys.exit(1)
-    print chkuri_from_path(args[0])
+    print(chkuri_from_path(args[0]))

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]