def main(): logging.basicConfig() log = logging.getLogger() log.setLevel(10) DEBUGLEVEL.value = 99 creds = sys.argv[1] hosts = sys.argv[2:] defs = [] for host in hosts: defs.append(doOneDevice(creds, host)) d = defer.DeferredList(defs) d.addBoth(lambda x: reactor.stop()) reactor.run()
def stop(result): print result reactor.stop()