Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed Jun 7, 2021
1 parent 60985d1 commit dce9f09
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit dce9f09

Please sign in to comment.