Revision a02dbfca qa/qa_utils.py
b/qa/qa_utils.py | ||
---|---|---|
28 | 28 |
import os |
29 | 29 |
import random |
30 | 30 |
import re |
31 |
import socket |
|
31 | 32 |
import subprocess |
32 | 33 |
import sys |
33 | 34 |
import tempfile |
... | ... | |
906 | 907 |
else: |
907 | 908 |
ret_policy[key] = val |
908 | 909 |
return (ret_policy, ret_specs) |
910 |
|
|
911 |
|
|
912 |
def UsesIPv6Connection(host, port): |
|
913 |
"""Returns True if the connection to a given host/port could go through IPv6. |
|
914 |
|
|
915 |
""" |
|
916 |
return any(t[0] == socket.AF_INET6 for t in socket.getaddrinfo(host, port)) |
Also available in: Unified diff