From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 13 Aug 2019 18:11:49 +0000 (-0700) Subject: bpo-37583: Add err 113 to support.get_socket_conn_refused_errs() (GH-14729) X-Git-Tag: v3.8.0b4~104 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee989512528d178d6f088916aba3e67ea9487ceb;p=python 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 --- diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index e73c65bb9f..e4e0481d33 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