diff options
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]) |