From 65d14278767c92e19267cb498bb7417c5a09a551 Mon Sep 17 00:00:00 2001 From: misygauziya Date: Tue, 15 Aug 2023 12:44:06 +0900 Subject: [PATCH] =?UTF-8?q?[bugfix]=20config.py=20AUTH=5FKEYES=E3=81=AEset?= =?UTF-8?q?ter=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 2 +- window_config.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 8b2d3290..cf5075b2 100644 --- a/config.py +++ b/config.py @@ -316,7 +316,7 @@ class Config: if type(value) is dict and set(value.keys()) == set(self.AUTH_KEYS.keys()): for key, value in value.items(): if type(value) is str: - self._AUTH_KEYS[key] = value[key] + self._AUTH_KEYS[key] = value save_json(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, self.AUTH_KEYS) @property diff --git a/window_config.py b/window_config.py index ef18acf2..8b28937e 100644 --- a/window_config.py +++ b/window_config.py @@ -437,7 +437,9 @@ class ToplevelWindowConfig(CTkToplevel): value = self.entry_authkey.get() if len(value) > 0: if self.parent.translator.authentication("DeepL(auth)", value) is True: - config.AUTH_KEYS["DeepL(auth)"] = value + auth_keys = config.AUTH_KEYS + auth_keys["DeepL(auth)"] = value + config.AUTH_KEYS = auth_keys print_textbox(self.parent.textbox_message_log, "Auth key update completed", "INFO") print_textbox(self.parent.textbox_message_system_log, "Auth key update completed", "INFO") else: