mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fix test_bad_address on Ubuntu 13.04
This commit is contained in:
parent
3b08a2978e
commit
6b5a38c728
1 changed files with 4 additions and 1 deletions
|
@ -116,7 +116,10 @@ class urlopenNetworkTests(unittest.TestCase):
|
|||
bogus_domain = "sadflkjsasf.i.nvali.d"
|
||||
try:
|
||||
socket.gethostbyname(bogus_domain)
|
||||
except socket.gaierror:
|
||||
except OSError:
|
||||
# socket.gaierror is too narrow, since getaddrinfo() may also
|
||||
# fail with EAI_SYSTEM and ETIMEDOUT (seen on Ubuntu 13.04),
|
||||
# i.e. Python's TimeoutError.
|
||||
pass
|
||||
else:
|
||||
# This happens with some overzealous DNS providers such as OpenDNS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue