1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-09-19 22:33:25 +01:00

Detect OTAs to older versions (~) and don't log if already known (%).

This commit is contained in:
Markus Birth 2018-05-29 10:59:47 +02:00
parent 7604fe2335
commit 8fb286b020
Signed by: mbirth
GPG Key ID: A9928D7A098C3A9A

View File

@ -43,8 +43,15 @@ for prd, data in versions.items():
chk = CheckRequest(dev)
runner.run(chk)
if chk.success:
print("", end="", flush=True)
num_item += 1
if chk.result.tvver == data["latest_ota"]:
print("", end="", flush=True)
num_item += 1
elif chk.result.tvver in data["update_map"] and ver in data["update_map"][chk.result.tvver]:
# Delete dump as we already know the information
chk.result.delete_dump()
print("%", end="", flush=True)
else:
print("~", end="", flush=True)
else:
print("", end="", flush=True)
print("")