Skip to content

Commit

Permalink
bpo-37583: Add err 113 to support.get_socket_conn_refused_errs() (GH-…
Browse files Browse the repository at this point in the history
…14729)

Add error number 113 EHOSTUNREACH to get_socket_conn_refused_errs()
of test.support.
  • Loading branch information
shihai1991 authored and vstinner committed Aug 13, 2019
1 parent b0dace3 commit 1ac2a83
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Lib/test/support/__init__.py
Expand Up @@ -1497,6 +1497,9 @@ def get_socket_conn_refused_errs():
# bpo-31910: socket.create_connection() fails randomly
# with EADDRNOTAVAIL on Travis CI
errors.append(errno.EADDRNOTAVAIL)
if hasattr(errno, 'EHOSTUNREACH'):
# bpo-37583: The destination host cannot be reached
errors.append(errno.EHOSTUNREACH)
if not IPV6_ENABLED:
errors.append(errno.EAFNOSUPPORT)
return errors
Expand Down

0 comments on commit 1ac2a83

Please sign in to comment.