projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0dace3
)
bpo-37583: Add err 113 to support.get_socket_conn_refused_errs() (GH-14729)
author
Hai Shi
<shihai1992@gmail.com>
Tue, 13 Aug 2019 17:37:59 +0000
(12:37 -0500)
committer
Victor Stinner
<vstinner@redhat.com>
Tue, 13 Aug 2019 17:37:59 +0000
(19:37 +0200)
Add error number 113 EHOSTUNREACH to get_socket_conn_refused_errs()
of test.support.
Lib/test/support/__init__.py
patch
|
blob
|
history
diff --git
a/Lib/test/support/__init__.py
b/Lib/test/support/__init__.py
index 00e734e7059f5e9eb869dac0327bff153faa955a..46d646fe5b76aa73f5e5abfc0f6693ff8830071d 100644
(file)
--- 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