8000 bpo-37583: Add err 113 to support.get_socket_conn_refused_errs() (GH-… · python/cpython@1ac2a83 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ac2a83

Browse files
shihai1991vstinner
authored andcommitted
bpo-37583: Add err 113 to support.get_socket_conn_refused_errs() (GH-14729)
Add error number 113 EHOSTUNREACH to get_socket_conn_refused_errs() of test.support.
1 parent b0dace3 commit 1ac2a83

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/support/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,6 +1497,9 @@ def get_socket_conn_refused_errs():
14971497
# bpo-31910: socket.create_connection() fails randomly
14981498
# with EADDRNOTAVAIL on Travis CI
14991499
errors.append(errno.EADDRNOTAVAIL)
1500+
if hasattr(errno, 'EHOSTUNREACH'):
1501+
# bpo-37583: The destination host cannot be reached
1502+
errors.append(errno.EHOSTUNREACH)
15001503
if not IPV6_ENABLED:
15011504
errors.append(errno.EAFNOSUPPORT)
15021505
return errors

0 commit comments

Comments
 (0)
0