From d10ee27a6fca29a4bec26e5559ffe518bdccadd4 Mon Sep 17 00:00:00 2001 From: luyanci <2058282593@qq.com> Date: Mon, 22 Jul 2024 17:59:44 +0800 Subject: [PATCH] fix:file not found --- plugins/libs/config.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/libs/config.py b/plugins/libs/config.py index ef61462..68d35fc 100644 --- a/plugins/libs/config.py +++ b/plugins/libs/config.py @@ -24,11 +24,8 @@ def loadroomcfg(): return def _make_default_cfg(): - try: - os.remove(f"./{room}.json") - finally: - with open(file=f"./{room}.json",mode="w",encoding="utf-8",errors="ignore") as cookies: - cookies.write(json.dumps(default,ensure_ascii=False)) + with open(file=f"./{room}.json",mode="w",encoding="utf-8",errors="ignore") as cookies: + cookies.write(json.dumps(default,ensure_ascii=False)) if __name__ == "__main__": #方便转换,直接运行这个py文件