]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-37583: Add err 113 to support.get_socket_conn_refused_errs() (GH-15259)
authorHai Shi <shihai1992@gmail.com>
Wed, 14 Aug 2019 09:52:36 +0000 (04:52 -0500)
committerVictor Stinner <vstinner@redhat.com>
Wed, 14 Aug 2019 09:52:36 +0000 (11:52 +0200)
Add error number 113 EHOSTUNREACH to get_socket_conn_refused_errs()
of test.support.

Lib/test/support/__init__.py

index bf1f0d2120acb85093593addd876f5a43b0662d7..d04d19985f7a052ccb73e23f824a224a7d87d57e 100644 (file)
@@ -1423,6 +1423,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)
     return errors