commit | 41e66a26b0b86291f5fb846ffe2dc641b5ced65a | [log] [tgz] |
---|---|---|
author | Senthil Kumaran <senthil@uthcode.com> | Sun Dec 23 09:04:24 2012 -0800 |
committer | Senthil Kumaran <senthil@uthcode.com> | Sun Dec 23 09:04:24 2012 -0800 |
tree | 9812deaeb24350f851a355f7dc3ec96dbb75d71c | |
parent | 3cbdaa3fee9489570124c368c94ff84718c81dae [diff] [blame] |
Fix Issue15701 - HTTPError info method call raises AttributeError. Fix that to return headers correctly
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 @@ 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):