From 6a30c62769bfa2c936445a0bbd75a1cc9419da93 Mon Sep 17 00:00:00 2001 From: misyaguziya <53165965+misyaguziya@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:56:47 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B[bugfix]=20Model=20:=20=E3=83=97?= =?UTF-8?q?=E3=83=AD=E3=82=AF=E3=82=B7=E7=AD=89=E3=81=A7POST/GET=E3=81=97?= =?UTF-8?q?=E3=81=9F=E5=A0=B4=E5=90=88=E3=81=ABSSL=E8=AA=8D=E8=A8=BC?= =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C=E7=99=BA=E7=94=9F=E3=81=99?= =?UTF-8?q?=E3=82=8B=E5=95=8F=E9=A1=8C=E3=81=AB=E5=AF=BE=E5=BF=9C=20#33?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-python/model.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src-python/model.py b/src-python/model.py index 8d1a0790..d57ebd19 100644 --- a/src-python/model.py +++ b/src-python/model.py @@ -323,14 +323,19 @@ class Model: def checkSoftwareUpdated(): # check update update_flag = False - response = requests_get(config.GITHUB_URL) - json_data = response.json() - version = json_data.get("name", None) - if isinstance(version, str): - new_version = parse(version) - current_version = parse(config.VERSION) - if new_version > current_version: - update_flag = True + try: + response = requests_get(config.GITHUB_URL) + json_data = response.json() + version = json_data.get("name", None) + if isinstance(version, str): + new_version = parse(version) + current_version = parse(config.VERSION) + if new_version > current_version: + update_flag = True + except Exception: + import traceback + with open('error.log', 'a') as f: + traceback.print_exc(file=f) return update_flag @staticmethod