mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Fix Issue15701 - HTTPError info method call raises AttributeError. Fix that to return headers correctly
This commit is contained in:
parent
3cbdaa3fee
commit
41e66a26b0
3 changed files with 31 additions and 9 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue