Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b08a29 commit 6b5a38cCopy full SHA for 6b5a38c
1 file changed
Lib/test/test_urllibnet.py
@@ -116,7 +116,10 @@ def test_bad_address(self):
116
bogus_domain = "sadflkjsasf.i.nvali.d"
117
try:
118
socket.gethostbyname(bogus_domain)
119
- except socket.gaierror:
+ except OSError:
120
+ # socket.gaierror is too narrow, since getaddrinfo() may also
121
+ # fail with EAI_SYSTEM and ETIMEDOUT (seen on Ubuntu 13.04),
122
+ # i.e. Python's TimeoutError.
123
pass
124
else:
125
# This happens with some overzealous DNS providers such as OpenDNS
0 commit comments