svn-fe: allow svnrdump_sim.py to run with Python 3
The changes to allow this script to run with Python 3 are minimal and do not affect its functionality on the versions of Python 2 that are already supported (2.4 onwards). Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
John Keeping committed
Jan 20, 2013 at 13:15 UTC
cadbf5c7ed4ea60d2b776346586b224e774dca4b
1 file changed
+2
-2
contrib/svn-fe/svnrdump_sim.py
+2
-2
@@ -14,7 +14,7 @@ if sys.hexversion < 0x02040000:
14
15
def getrevlimit():
16
var = 'SVNRMAX'
17
- if os.environ.has_key(var):
17
+ if var in os.environ:
18
return os.environ[var]
19
return None
20
@@ -44,7 +44,7 @@ def writedump(url, lower, upper):
44
45
if __name__ == "__main__":
46
if not (len(sys.argv) in (3, 4, 5)):
47
- print "usage: %s dump URL -rLOWER:UPPER"
47
+ print("usage: %s dump URL -rLOWER:UPPER")
48
sys.exit(1)
49
if not sys.argv[1] == 'dump': raise NotImplementedError('only "dump" is suppported.')
50
url = sys.argv[2]