##// END OF EJS Templates
tests: just use 'response.reason'...
Pierre-Yves David -
r25208:5a6820f8 default
parent child Browse files
Show More
@@ -33,8 +33,6 b" if '--json' in sys.argv:"
33 33 sys.argv.remove('--json')
34 34 formatjson = True
35 35
36 reasons = {'Not modified': 'Not Modified'} # python 2.4
37
38 36 tag = None
39 37 def request(host, path, show):
40 38 assert not path.startswith('/'), path
@@ -46,7 +44,7 b' def request(host, path, show):'
46 44 conn = httplib.HTTPConnection(host)
47 45 conn.request("GET", '/' + path, None, headers)
48 46 response = conn.getresponse()
49 print response.status, reasons.get(response.reason, response.reason)
47 print response.status, response.reason
50 48 if show[:1] == ['-']:
51 49 show = sorted(h for h, v in response.getheaders()
52 50 if h.lower() not in show)
General Comments 0
You need to be logged in to leave comments. Login now