Skip to content

Commit fbb0c03

Browse files
shihai1991vstinner
authored andcommitted
bpo-37583: Add err 113 to support.get_socket_conn_refused_errs() (GH-15259)
Add error number 113 EHOSTUNREACH to get_socket_conn_refused_errs() of test.support.
1 parent 37fd9f7 commit fbb0c03

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
@@ -1423,6 +1423,9 @@ def get_socket_conn_refused_errs():
14231423
# bpo-31910: socket.create_connection() fails randomly
14241424
# with EADDRNOTAVAIL on Travis CI
14251425
errors.append(errno.EADDRNOTAVAIL)
1426+
if hasattr(errno, 'EHOSTUNREACH'):
1427+
# bpo-37583: The destination host cannot be reached
1428+
errors.append(errno.EHOSTUNREACH)
14261429
return errors
14271430

14281431

0 commit comments

Comments
 (0)