From 9a3b3447bec84eff58bd4e0d209e8a2ee772412c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Sun, 28 Jul 2024 23:35:06 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/myutils/config.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/LunaTranslator/LunaTranslator/myutils/config.py b/LunaTranslator/LunaTranslator/myutils/config.py index b94c10d4..221cc77d 100644 --- a/LunaTranslator/LunaTranslator/myutils/config.py +++ b/LunaTranslator/LunaTranslator/myutils/config.py @@ -217,12 +217,11 @@ for uid in savehook_new_data: savehook_new_data[uid]["private_tgtlang_2"] = oldlanguage[ savehook_new_data[uid]["private_tgtlang"] ] - for k in _dfsavehook: - if k not in savehook_new_data[uid]: - __v = _dfsavehook[k] - if isinstance(_dfsavehook[k], (list, dict)): + for __k, __v in _dfsavehook.items(): + if __k not in savehook_new_data[uid]: + if isinstance(__v, (list, dict)): __v = __v.copy() - savehook_new_data[uid][k] = __v + savehook_new_data[uid][__k] = __v class __uid2gamepath: