summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 3b112e6..6e72180 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -666,7 +666,8 @@ class GeneralModuleTests(unittest.TestCase):
socket.AI_PASSIVE)
# Issue 17269
- socket.getaddrinfo("localhost", None, 0, 0, 0, socket.AI_NUMERICSERV)
+ if hasattr(socket, 'AI_NUMERICSERV'):
+ socket.getaddrinfo("localhost", None, 0, 0, 0, socket.AI_NUMERICSERV)
def check_sendall_interrupted(self, with_timeout):
# socketpair() is not stricly required, but it makes things easier.