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():