diff options
author | Hai Shi <shihai1992@gmail.com> | 2019-08-13 17:37:59 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-08-13 17:37:59 (GMT) |
commit | 1ac2a83f30312976502fda042db5ce18d10ceec2 (patch) | |
tree | dffac726243c39fcd8fa411b61b352593ffe567d | |
parent | b0dace3e979381426385c551b116d0f1434096ee (diff) | |
download | cpython-1ac2a83f30312976502fda042db5ce18d10ceec2.zip cpython-1ac2a83f30312976502fda042db5ce18d10ceec2.tar.gz cpython-1ac2a83f30312976502fda042db5ce18d10ceec2.tar.bz2 |
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.
-rw-r--r-- | Lib/test/support/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 00e734e..46d646f 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -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 |