From b26411eec787b12ecd8e2c7d095f9360c05d7950 Mon Sep 17 00:00:00 2001 From: shileiye Date: Thu, 6 Jan 2022 19:26:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=89=88=E6=9C=AC=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 73a0d8a..43ec597 100644 --- a/main.py +++ b/main.py @@ -461,7 +461,10 @@ def startfile(filename): # 获取最新程序版本号 def getNewVersion(): 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)