👍[Update] model : update結果をreturnで出力するように変更
This commit is contained in:
14
model.py
14
model.py
@@ -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():
|
||||||
|
|||||||
Reference in New Issue
Block a user