[PATCH 5/8] svn-fe: allow svnrdump_sim.py to run with Python 3
- From
John Keeping <john@keeping.me.uk>
- Date
- Jan 12, 2013, 19:23 UTC
- Message-ID
- <fcc99192ded58bf017a56a3e2f3cfb2fce06bd5b.1358018078.git.john@keeping.me.uk>
- In-Reply-To
- <cover.1358018078.git.john@keeping.me.uk>
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> --- contrib/svn-fe/svnrdump_sim.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/svn-fe/svnrdump_sim.py b/contrib/svn-fe/svnrdump_sim.py index 17cf6f9..4e78a1c 100755 --- a/contrib/svn-fe/svnrdump_sim.py +++ b/contrib/svn-fe/svnrdump_sim.py @@ -14,7 +14,7 @@ if sys.hexversion < 0x02040000: def getrevlimit(): var = 'SVNRMAX' - if os.environ.has_key(var): + if var in os.environ: return os.environ[var] return None @@ -44,7 +44,7 @@ def writedump(url, lower, upper): if __name__ == "__main__": if not (len(sys.argv) in (3, 4, 5)): - print "usage: %s dump URL -rLOWER:UPPER" + print("usage: %s dump URL -rLOWER:UPPER") sys.exit(1) if not sys.argv[1] == 'dump': raise NotImplementedError('only "dump" is suppported.') url = sys.argv[2]
-- 1.8.1