mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Issue #8835: test_support.transient_internet() catchs gaierror(EAI_NONAME) and
gaierror(EAI_NODATA)
This commit is contained in:
parent
29f1bb3227
commit
03883624a4
2 changed files with 6 additions and 1 deletions
|
|
@ -757,7 +757,9 @@ def transient_internet():
|
|||
time_out = TransientResource(IOError, errno=errno.ETIMEDOUT)
|
||||
socket_peer_reset = TransientResource(socket.error, errno=errno.ECONNRESET)
|
||||
ioerror_peer_reset = TransientResource(IOError, errno=errno.ECONNRESET)
|
||||
with time_out, socket_peer_reset, ioerror_peer_reset:
|
||||
dns_nodata = TransientResource(socket.gaierror, errno=socket.EAI_NODATA)
|
||||
dns_noname = TransientResource(socket.gaierror, errno=socket.EAI_NONAME)
|
||||
with time_out, socket_peer_reset, ioerror_peer_reset, dns_nodata, dns_noname:
|
||||
yield
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue