1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-11-09 22:06:47 +00: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) chk = CheckRequest(dev)
runner.run(chk) runner.run(chk)
if chk.success: if chk.success:
print("", end="", flush=True) if chk.result.tvver == data["latest_ota"]:
num_item += 1 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: else:
print("", end="", flush=True) print("", end="", flush=True)
print("") print("")