# HG changeset patch # User Dirkjan Ochtman # Date 1284195455 -7200 # Node ID ede95d3a1f2707c457cb297f63511028256577f4 # Parent 5a3bcda2de2967b366d493e91959fc2d1d9cc379 tests: fix incompatibility with python-2.4 in test-hgweb Thanks to lcantey for catching it. [ original upstream message ] diff -r 5a3bcda2de29 -r ede95d3a1f27 tests/get-with-headers.py --- a/tests/get-with-headers.py Wed Sep 08 15:11:35 2010 +0200 +++ b/tests/get-with-headers.py Sat Sep 11 10:57:35 2010 +0200 @@ -17,6 +17,8 @@ sys.argv.remove('--twice') twice = True +reasons = {'Not modified': 'Not Modified'} # python 2.4 + tag = None def request(host, path, show): @@ -28,7 +30,7 @@ conn = httplib.HTTPConnection(host) conn.request("GET", path, None, headers) response = conn.getresponse() - print response.status, response.reason + print response.status, reasons.get(response.reason, response.reason) for h in [h.lower() for h in show]: if response.getheader(h, None) is not None: print "%s: %s" % (h, response.getheader(h))