diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-08-13 18:11:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-13 18:11:49 (GMT) |
commit | ee989512528d178d6f088916aba3e67ea9487ceb (patch) | |
tree | 75c539fd9025f63bb98bf58e9060cdcc78c5e40d /Lib | |
parent | 853eecc7692503fec8240fd9a74d9f88e0392630 (diff) | |
download | cpython-ee989512528d178d6f088916aba3e67ea9487ceb.zip cpython-ee989512528d178d6f088916aba3e67ea9487ceb.tar.gz cpython-ee989512528d178d6f088916aba3e67ea9487ceb.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.
(cherry picked from commit 1ac2a83f30312976502fda042db5ce18d10ceec2)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
Diffstat (limited to 'Lib')
-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 e73c65b..e4e0481 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1495,6 +1495,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 |