def discover(timeout=1.5):
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
    sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2)
    sock.sendto(SSDP_MSEARCH_QUERY.encode("utf-8"), (SSDP_ADDR, SSDP_PORT))
    sock.settimeout(timeout)

    responses = []
    try:
        while True:
            responses.append(sock.recv(10240))
    except socket.timeout:
        pass

    results = []
    for res in responses:
        m = re.search(r"LOCATION:(.+)", res.decode('utf-8'), re.IGNORECASE)
        if not m:
            continue
        url = m.group(1).strip()
        res = rxv_details(url)
        if res:
            results.append(res)

    return results
Patched version of fabric's execute task with alternative error handling
dataset/ETHPy150Open wuub/rxv/rxv/ssdp.py/discover--crossover with--dataset/ETHPy150Open prestodb/presto-admin/prestoadmin/fabric_patches.py/execute