From 2b257f00128d61505828b501ee70e55c69d50178 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Mon, 24 May 2021 16:44:43 +0300 Subject: [PATCH] Fixed bugs merge bugs where structures are being accessed in an outdated ways --- monkey/monkey_island.py | 4 ++-- monkey/monkey_island/setup/config_setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/monkey_island.py b/monkey/monkey_island.py index 200dd9b1f..3ea35eed1 100644 --- a/monkey/monkey_island.py +++ b/monkey/monkey_island.py @@ -15,8 +15,8 @@ if "__main__" == __name__: # This is here in order to catch EVERYTHING, some functions are being called on # imports, so the log init needs to be first. try: - if island_args.server_config: - config, server_config_path = setup_config_by_cmd_arg(island_args.server_config) + if island_args.server_config_path: + config, server_config_path = setup_config_by_cmd_arg(island_args.server_config_path) else: config, server_config_path = setup_default_config() diff --git a/monkey/monkey_island/setup/config_setup.py b/monkey/monkey_island/setup/config_setup.py index 12f073f64..5c9625ac4 100644 --- a/monkey/monkey_island/setup/config_setup.py +++ b/monkey/monkey_island/setup/config_setup.py @@ -11,7 +11,7 @@ def setup_config_by_cmd_arg(server_config_path) -> Tuple[IslandConfigOptions, st server_config_path = os.path.expandvars(os.path.expanduser(server_config_path)) config = server_config_handler.load_server_config_from_file(server_config_path) - create_data_dir(config["data_dir"], create_parent_dirs=True) + create_data_dir(config.data_dir, create_parent_dirs=True) return config, server_config_path