👍[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()
@staticmethod
def checkSoftwareUpdated(fnc):
def checkSoftwareUpdated():
# check update
update_flag = False
response = requests_get(config.GITHUB_URL)
tag_name = response.json()["tag_name"]
if tag_name != config.VERSION:
try:
fnc(True)
except:
pass
new_version = response.json()["name"]
if new_version != config.VERSION:
update_flag = True
print("software version", "now:", config.VERSION, "new:", new_version)
return update_flag
@staticmethod
def getListInputHost():