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:04:24 -08:00
parent 3cbdaa3fee
commit 41e66a26b0
3 changed files with 31 additions and 9 deletions

View file

@ -58,6 +58,10 @@ class HTTPError(URLError, urllib.response.addinfourl):
def reason(self):
return self.msg
def info(self):
return self.hdrs
# exception raised when downloaded size does not match content-length
class ContentTooShortError(URLError):
def __init__(self, message, content):