diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-12-23 17:12:13 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-12-23 17:12:13 (GMT) |
commit | 0a6b9eca683068d5aabba255370b5ee8e25d7850 (patch) | |
tree | 101e883700ecf9e6ba00234a5143d6b93361d719 /Lib/urllib/error.py | |
parent | e3dff55a5e86073c1400dee138a6e8959cfe2b8e (diff) | |
parent | 41e66a26b0b86291f5fb846ffe2dc641b5ced65a (diff) | |
download | cpython-0a6b9eca683068d5aabba255370b5ee8e25d7850.zip cpython-0a6b9eca683068d5aabba255370b5ee8e25d7850.tar.gz cpython-0a6b9eca683068d5aabba255370b5ee8e25d7850.tar.bz2 |
merge from 3.2
Fix Issue15701 - HTTPError info method call raises AttributeError. Fix that to return headers correctly
Diffstat (limited to 'Lib/urllib/error.py')
-rw-r--r-- | Lib/urllib/error.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/urllib/error.py b/Lib/urllib/error.py index c1dfc40..b712ebb 100644 --- a/Lib/urllib/error.py +++ b/Lib/urllib/error.py @@ -61,6 +61,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): |