From 928cafa5cb9c2a9f3c84373c4a059a8ade6495fa Mon Sep 17 00:00:00 2001 From: Dave Date: Sat, 8 Jun 2024 06:22:27 +0100 Subject: [PATCH] Fix logging --- install_script.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install_script.py b/install_script.py index 744aa5d..7482570 100644 --- a/install_script.py +++ b/install_script.py @@ -74,13 +74,13 @@ def update_amp_config(instance_path: Path) -> None: plugins_list = eval(plugins) if plugin_name not in plugins_list: plugins_list.append(plugin_name) - lines[i] = 'AMP.LoadPlugins={}\n'.format(str(plugins_list)) - with open(config_path, 'w') as f: - f.writelines(lines) - logger.info(f'Updated AMP.LoadPlugins in {config_path}') + lines[i] = 'AMP.LoadPlugins={}\n'.format(str(plugins_list)) + with open(config_path, 'w') as f: + f.writelines(lines) + logger.info(f'Updated AMP.LoadPlugins in {config_path}') + else: + logger.info(f'{plugin_name} already in AMP.LoadPlugins') break - else: - logger.info(f'{plugin_name} already in AMP.LoadPlugins') def copy_dll_to_plugin_folder(instance_path: Path) -> None: discordbot_plugin_dir = instance_path / plugin_dll_dir