1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-11-09 22:06:47 +00:00

Output old version for FULL search as well. Also: colour coding - OTA=yellow, FULL=cyan

This commit is contained in:
Markus Birth 2017-12-20 00:00:28 +01:00
parent 9d8e0e8ff1
commit 99b4fd7912
Signed by: mbirth
GPG Key ID: A9928D7A098C3A9A
2 changed files with 6 additions and 2 deletions

6
tclcheck_allfull.py Executable file → Normal file
View File

@ -41,7 +41,11 @@ for prd, variant in prds.items():
curef, fv, tv, fw_id, fileid, fn, fsize, fhash = fc.parse_check(check_xml)
txt_tv = tv
if tv != lastver:
txt_tv = tcllib.ANSI_CYAN + txt_tv + tcllib.ANSI_RESET + " (OTA: {})".format(variant["last_ota"])
txt_tv = "{} (old: {} / OTA: {})".format(
tcllib.ANSI_CYAN + txt_tv + tcllib.ANSI_RESET,
tcllib.ANSI_CYAN_DARK + variant["last_full"] + tcllib.ANSI_RESET,
variant["last_ota"]
)
print("{}: {} {} ({})".format(prd, txt_tv, fhash, model))
except RequestException as e:
print("{}: {}".format(prd, str(e)))

2
tclcheck_allota.py Executable file → Normal file
View File

@ -48,7 +48,7 @@ for prd, variant in prds.items():
fc.fv = lastver
check_xml = fc.do_check(max_tries=20)
curef, fv, tv, fw_id, fileid, fn, fsize, fhash = fc.parse_check(check_xml)
versioninfo = tcllib.ANSI_CYAN_DARK + fv + tcllib.ANSI_RESET + "" + tcllib.ANSI_CYAN + tv + tcllib.ANSI_RESET + " (FULL: {})".format(variant["last_full"])
versioninfo = tcllib.ANSI_YELLOW_DARK + fv + tcllib.ANSI_RESET + "" + tcllib.ANSI_YELLOW + tv + tcllib.ANSI_RESET + " (FULL: {})".format(variant["last_full"])
print("{}: {} {} ({})".format(prd, versioninfo, fhash, model))
except RequestException as e:
print("{} ({}): {}".format(prd, lastver, str(e)))