Example #1
0
def get_devices():
    results = {"err": []}
    for h in hosts:
        cgm = CgminerAPI(host=h['hostname'])
        try:
            data = cgm.devs()
            results[h['name']] = data['DEVS']
        except Exception, errno:
            results["err"].append(h)
            logging.error("timeout")