From 03c49fe4da6de582a75a604713afc63a22928954 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 14 Sep 2022 13:55:13 -0400 Subject: [PATCH] Island: Shorten subscription code --- monkey/monkey_island/cc/setup/agent_event_handlers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/setup/agent_event_handlers.py b/monkey/monkey_island/cc/setup/agent_event_handlers.py index af37e6740..c859be28e 100644 --- a/monkey/monkey_island/cc/setup/agent_event_handlers.py +++ b/monkey/monkey_island/cc/setup/agent_event_handlers.py @@ -15,8 +15,7 @@ def setup_agent_event_handlers(container: DIContainer): def _subscribe_and_store_to_event_repository(container: DIContainer): agent_event_queue = container.resolve(IAgentEventQueue) - event_repository = container.resolve(IEventRepository) - save_event_subscriber = save_event_to_event_repository(event_repository) + save_event_subscriber = save_event_to_event_repository(container.resolve(IEventRepository)) agent_event_queue.subscribe_all_events(save_event_subscriber) save_stolen_credentials_subscriber = save_stolen_credentials_to_repository(