From 82d8f5bacdf48cad6e60623f92d27885570a6239 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Tue, 30 Aug 2022 22:56:02 +0530 Subject: [PATCH] Island: Simplify JSON logic inFileAgentConfigurationRepository --- .../cc/repository/file_agent_configuration_repository.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/repository/file_agent_configuration_repository.py b/monkey/monkey_island/cc/repository/file_agent_configuration_repository.py index 7e1d13d8e..ca720d48c 100644 --- a/monkey/monkey_island/cc/repository/file_agent_configuration_repository.py +++ b/monkey/monkey_island/cc/repository/file_agent_configuration_repository.py @@ -31,10 +31,10 @@ class FileAgentConfigurationRepository(IAgentConfigurationRepository): raise RetrievalError(f"Error retrieving the agent configuration: {err}") def store_configuration(self, agent_configuration: AgentConfiguration): - configuration_json = agent_configuration.dict() + configuration_json = agent_configuration.json() self._file_repository.save_file( - AGENT_CONFIGURATION_FILE_NAME, io.BytesIO(json.dumps(configuration_json).encode()) + AGENT_CONFIGURATION_FILE_NAME, io.BytesIO(configuration_json.encode()) ) def reset_to_default(self):