def lookup_family(hostname):
    # If lookups fail, fall back to AF_INET sockets (and v4 addresses).
    fallback = socket.AF_INET
    try:
        hostnames = socket.getaddrinfo(
            hostname or None, None, socket.AF_UNSPEC, socket.SOCK_STREAM
        )
        if not hostnames:
            return fallback
        h = hostnames[0]
        return h[0]
    except socket.gaierror:
        return fallback
Create a new cookie or replace an old one. If the `secret` parameter is
dataset/ETHPy150Open saltstack/salt/salt/utils/verify.py/lookup_family--crossover with--dataset/ETHPy150Open adampresley/bottlepy-bootstrap/app/bottle.py/BaseResponse.set_cookie