[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] compatibility with python 3 in build/getversion.py

From: Eitan Adler <lists_at_eitanadler.com>
Date: Sat, 13 Jul 2013 03:07:23 +0200

This breaks compatibility with python 2.5 or less but it makes it
better for newer versions of python.

 [[[
Permit build/geversion.py to be run when python is python 3.
 ]]]
Index: build/getversion.py
===================================================================
--- build/getversion.py (revision 1502731)
+++ build/getversion.py (working copy)
@@ -64,7 +64,7 @@ def svn_extractor(parser, include_file):

   try:
     r = p.parse(include_file)
- except IOError, e:
+ except IOError as e:
     usage_and_exit(str(e))
   sys.stdout.write("%d.%d.%d" % (r.major, r.minor, r.patch))

@@ -75,7 +75,7 @@ def sqlite_extractor(parser, include_file):

   try:
     r = p.parse(include_file)
- except IOError, e:
+ except IOError as e:
     usage_and_exit(str(e))
   major = r.version / 1000000
   minor = (r.version - (major * 1000000)) / 1000

-- 
Eitan Adler

  • application/octet-stream attachment: py3.diff
Received on 2013-07-13 04:10:19 CEST

This is an archived mail posted to the Subversion Dev mailing list.