PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.

This commit is contained in:
Antoine Pitrou 2011-10-12 02:54:14 +02:00
parent 983b1434bd
commit 6b4883dec0
21 changed files with 689 additions and 454 deletions

View file

@ -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])