👍[Update] model : update結果をreturnで出力するように変更

This commit is contained in:
misyaguziya
2023-09-24 05:36:39 +09:00
parent c532861091
commit a9692a2ee9

View File

@@ -219,15 +219,15 @@ class Model:
fnc() fnc()
@staticmethod @staticmethod
def checkSoftwareUpdated(fnc): def checkSoftwareUpdated():
# check update # check update
update_flag = False
response = requests_get(config.GITHUB_URL) response = requests_get(config.GITHUB_URL)
tag_name = response.json()["tag_name"] new_version = response.json()["name"]
if tag_name != config.VERSION: if new_version != config.VERSION:
try: update_flag = True
fnc(True) print("software version", "now:", config.VERSION, "new:", new_version)
except: return update_flag
pass
@staticmethod @staticmethod
def getListInputHost(): def getListInputHost():