def killall(): global proxies for p in proxies: apiclient.kill(conf.USER_NAME, conf.PASSWORD, p.sensor_name) p.stop() proxies = []
def kill(id_): p = proxy_by_id(id_) if p: apiclient.kill(conf.USER_NAME, conf.PASSWORD, p.sensor_name) p.stop() proxies.remove(p) return '' return 'error'