cc: remove unnecessary `config` property from environment_singleton

Introduced in b0d478473fe
This commit is contained in:
Mike Salvatore 2021-02-16 15:12:57 -05:00
parent b5e8d895c8
commit 1fad6b4666
3 changed files with 2 additions and 5 deletions

View File

@ -20,7 +20,6 @@ ENV_DICT = {
}
env = None
config = None
def set_env(env_type: str, env_config: EnvironmentConfig):
@ -40,8 +39,6 @@ def set_to_standard():
def initialize_from_file(file_path):
global config
try:
config = EnvironmentConfig(file_path)

View File

@ -35,7 +35,7 @@ MINIMUM_MONGO_DB_VERSION_REQUIRED = "4.2.0"
def main(should_setup_only=False, server_config_filename=DEFAULT_SERVER_CONFIG_PATH):
logger.info("Starting bootloader server")
env_singleton.initialize_from_file(server_config_filename)
initialize_encryptor(env_singleton.config.data_dir_abs_path)
initialize_encryptor(env_singleton.env.get_config().data_dir_abs_path)
mongo_url = os.environ.get('MONGO_URL', env_singleton.env.get_mongo_url())
bootloader_server_thread = Thread(target=BootloaderHttpServer(mongo_url).serve_forever, daemon=True)

View File

@ -32,7 +32,7 @@ def run_local_monkey():
return False, "OS Type not found"
monkey_path = os.path.join(MONKEY_ISLAND_ABS_PATH, 'cc', 'binaries', result['filename'])
target_path = os.path.join(env_singleton.config.data_dir_abs_path, result['filename'])
target_path = os.path.join(env_singleton.env.get_config().data_dir_abs_path, result['filename'])
# copy the executable to temp path (don't run the monkey from its current location as it may delete itself)
try: