增加版本更新的异常处理
This commit is contained in:
parent
95399c668c
commit
b26411eec7
5
main.py
5
main.py
@ -461,7 +461,10 @@ def startfile(filename):
|
|||||||
# 获取最新程序版本号
|
# 获取最新程序版本号
|
||||||
def getNewVersion():
|
def getNewVersion():
|
||||||
url = r'http://127.0.0.1:82/Version.txt'
|
url = r'http://127.0.0.1:82/Version.txt'
|
||||||
value = requests.get(url, timeout=10).content.decode()
|
try:
|
||||||
|
value = requests.get(url, timeout=10).content.decode()
|
||||||
|
except:
|
||||||
|
value = 0
|
||||||
return float(value)
|
return float(value)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user