summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2019-08-13 17:37:59 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-08-13 17:37:59 (GMT)
commit1ac2a83f30312976502fda042db5ce18d10ceec2 (patch)
treedffac726243c39fcd8fa411b61b352593ffe567d /Lib
parentb0dace3e979381426385c551b116d0f1434096ee (diff)
downloadcpython-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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/support/__init__.py3
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