summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-12-23 17:04:24 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2012-12-23 17:04:24 (GMT)
commit41e66a26b0b86291f5fb846ffe2dc641b5ced65a (patch)
tree9812deaeb24350f851a355f7dc3ec96dbb75d71c /Lib/urllib
parent3cbdaa3fee9489570124c368c94ff84718c81dae (diff)
downloadcpython-41e66a26b0b86291f5fb846ffe2dc641b5ced65a.zip
cpython-41e66a26b0b86291f5fb846ffe2dc641b5ced65a.tar.gz
cpython-41e66a26b0b86291f5fb846ffe2dc641b5ced65a.tar.bz2
Fix Issue15701 - HTTPError info method call raises AttributeError. Fix that to return headers correctly
Diffstat (limited to 'Lib/urllib')
-rw-r--r--Lib/urllib/error.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/urllib/error.py b/Lib/urllib/error.py
index 40add41..eb14c1d 100644
--- a/Lib/urllib/error.py
+++ b/Lib/urllib/error.py
@@ -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):