aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/urllib/error.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/urllib/error.py')
-rw-r--r--Lib/urllib/error.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/urllib/error.py b/Lib/urllib/error.py
index b712ebb5cb3..237ed6b9bb8 100644
--- a/Lib/urllib/error.py
+++ b/Lib/urllib/error.py
@@ -61,9 +61,13 @@ class HTTPError(URLError, urllib.response.addinfourl):
def reason(self):
return self.msg
- def info(self):
+ @property
+ def headers(self):
return self.hdrs
+ @headers.setter
+ def headers(self, headers):
+ self.hdrs = headers
# exception raised when downloaded size does not match content-length
class ContentTooShortError(URLError):