mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #16717: get rid of socket.error, replace with OSError
This commit is contained in:
parent
ad28c7f9da
commit
0832af6628
39 changed files with 169 additions and 167 deletions
|
@ -1130,8 +1130,9 @@ class Transport:
|
|||
for i in (0, 1):
|
||||
try:
|
||||
return self.single_request(host, handler, request_body, verbose)
|
||||
except socket.error as e:
|
||||
if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE):
|
||||
except OSError as e:
|
||||
if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED,
|
||||
errno.EPIPE):
|
||||
raise
|
||||
except http.client.BadStatusLine: #close after we sent request
|
||||
if i:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue