def socket_any_family():
    try:
        return socket(AF_INET)
    except error as e:
        if (e.errno == EAFNOSUPPORT):
            return socket(AF_INET6)
        raise
def socket_any_family():
    try:
        return socket(AF_INET)
    except error as e:
        if (e.errno == EAFNOSUPPORT):
            return socket(AF_INET6)
        raise