Fix Issue15701 - HTTPError info method call raises AttributeError. Fix that to return headers correctly

This commit is contained in:
Senthil Kumaran 2012-12-23 09:00:47 -08:00
parent cddcafaf6b
commit f8a6b005fd
3 changed files with 30 additions and 9 deletions

View file

@ -173,6 +173,9 @@ class HTTPError(URLError, addinfourl):
def reason(self):
return self.msg
def info(self):
return self.hdrs
# copied from cookielib.py
_cut_port_re = re.compile(r":\d+$")
def request_host(request):