def main(): """ launches the program :return: None """ try: session = Session() config = get_config_file(CONFIG_FILE) map_network(config[NMAP_SECTION]) agents = start_server_monitoring(config[AGENTS_SECTION], session) ping_handler = PingHandler() for agent in agents: agent.join() except Exception as error: logging.error("TERMINAL ERROR IN THE MAIN MODULE: %s", error) Session.remove() engine.dispose() sys.exit(-1)
def _stop(self): """ Close the session """ Session.remove()