mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
typo
This commit is contained in:
+3
-3
@@ -606,14 +606,14 @@ def check_version(local):
|
|||||||
try:
|
try:
|
||||||
resp = requests.get(url=api, headers=header, proxies=proxy,
|
resp = requests.get(url=api, headers=header, proxies=proxy,
|
||||||
timeout=timeout, verify=verify)
|
timeout=timeout, verify=verify)
|
||||||
json = resp.json()
|
resp_json = resp.json()
|
||||||
latest = json['tag_name']
|
latest = resp_json['tag_name']
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.log('ERROR', 'An error occurred while checking the latest version')
|
logger.log('ERROR', 'An error occurred while checking the latest version')
|
||||||
logger.log('ERROR', e.args)
|
logger.log('ERROR', e.args)
|
||||||
return
|
return
|
||||||
if latest > local:
|
if latest > local:
|
||||||
change = json.get("body")
|
change = resp_json.get("body")
|
||||||
logger.log('ALERT', f'The current version is {local} '
|
logger.log('ALERT', f'The current version is {local} '
|
||||||
f'but the latest version is {latest}')
|
f'but the latest version is {latest}')
|
||||||
logger.log('ALERT', f'The {latest} version mainly has the following changes')
|
logger.log('ALERT', f'The {latest} version mainly has the following changes')
|
||||||
|
|||||||
Reference in New Issue
Block a user