diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-12 00:54:14 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-12 00:54:14 (GMT) |
commit | 6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7 (patch) | |
tree | e731290ba41ff9208385bebbe402282ecbbd682f /Lib/urllib | |
parent | 983b1434bda1819864fb5d82248f249358a4c22d (diff) | |
download | cpython-6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7.zip cpython-6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7.tar.gz cpython-6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7.tar.bz2 |
PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 671ab68..a947608 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -1547,6 +1547,8 @@ class URLopener: return getattr(self, name)(url) else: return getattr(self, name)(url, data) + except HTTPError: + raise except socket.error as msg: raise IOError('socket error', msg).with_traceback(sys.exc_info()[2]) |