Skip to content

Commit 1984003

Browse files
committed
Merge branch 'main'
2 parents 867464b + a098423 commit 1984003

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

facebook/FBreptilever.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,13 @@ def download_file_with_progress_http(url, local_path, progress_var, progress_lab
186186

187187

188188
async def check_version():
189-
with open('config.json', 'r', encoding='utf-8') as f:
190-
conig = json.load(f)
191-
version = conig['version']
192-
print("当前版本:", version)
193-
remote_version_url = 'http://ver.ry188.vip/API/getver.aspx?N=FBreptile'
189+
config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "config.json")
190+
if os.path.exists(config_path):
191+
with open(config_path, 'r', encoding='utf-8') as f:
192+
conig = json.load(f)
193+
version = conig['version']
194+
print("当前版本:", version)
195+
remote_version_url = 'http://ver.ry188.vip/API/getver.aspx?N=FBreptile'
194196

195197
async with aiohttp.ClientSession() as session:
196198
async with session.get(remote_version_url, headers=headers) as response:

0 commit comments

Comments
 (0)