def try_ipv6_socket():
    """Determine if system really supports IPv6"""
    if not socket.has_ipv6:
        return False
    try:
        socket.socket(socket.AF_INET6).close()
        return True
    except __HOLE__ as error:
        logger.debug(
            'Platform supports IPv6, but socket creation failed, '
            'disabling: %s',
            encoding.locale_decode(error))
    return False


#: Boolean value that indicates if creating an IPv6 socket will succeed.
dataset/ETHPy150Open mopidy/mopidy/mopidy/internal/network.py/try_ipv6_socket