changeset 25208:5a6820f8da4d

tests: just use 'response.reason' There is no reason to not have simple code now that Python 2.4 is dead.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 18 May 2015 16:52:28 -0500
parents 6358391453f3
children 277a535c0b3a
files tests/get-with-headers.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/get-with-headers.py	Mon May 18 16:51:02 2015 -0500
+++ b/tests/get-with-headers.py	Mon May 18 16:52:28 2015 -0500
@@ -33,8 +33,6 @@
     sys.argv.remove('--json')
     formatjson = True
 
-reasons = {'Not modified': 'Not Modified'} # python 2.4
-
 tag = None
 def request(host, path, show):
     assert not path.startswith('/'), path
@@ -46,7 +44,7 @@
     conn = httplib.HTTPConnection(host)
     conn.request("GET", '/' + path, None, headers)
     response = conn.getresponse()
-    print response.status, reasons.get(response.reason, response.reason)
+    print response.status, response.reason
     if show[:1] == ['-']:
         show = sorted(h for h, v in response.getheaders()
                       if h.lower() not in show)