From dce9f09a3981686c385c8591f8291f0212d6744e Mon Sep 17 00:00:00 2001 From: xfangfang <2553041586@qq.com> Date: Mon, 7 Jun 2021 22:10:47 +0800 Subject: [PATCH] Fix error --- utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index 98bea35b8..d509fb8ba 100644 --- a/utils.py +++ b/utils.py @@ -34,12 +34,13 @@ def save(): @staticmethod def load(): logger.error("Load Setting") + with open('.version', 'r') as f: + Setting.version = f.read().strip() if not os.path.exists(Setting.setting_path): Setting.setting = {} + return with open(Setting.setting_path, "r") as f: Setting.setting = json.load(fp=f) - with open('.version', 'r') as f: - Setting.version = f.read().strip() @staticmethod def getVersion():