Skip to content

Commit

Permalink
防止打包没有数据文件报错
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoyaoo committed Dec 28, 2023
1 parent 742c781 commit bd9bc2b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pywxdump/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@

import os, json

VERSION_LIST_PATH = os.path.join(os.path.dirname(__file__), "version_list.json")
with open(VERSION_LIST_PATH, "r", encoding="utf-8") as f:
VERSION_LIST = json.load(f)
try:
VERSION_LIST_PATH = os.path.join(os.path.dirname(__file__), "version_list.json")
with open(VERSION_LIST_PATH, "r", encoding="utf-8") as f:
VERSION_LIST = json.load(f)
except:
VERSION_LIST = {}
VERSION_LIST_PATH = None

__version__ = "2.3.26"

0 comments on commit bd9bc2b

Please sign in to comment.