1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-11-10 06:16:46 +00:00

Highlight full versions different to latest OTA.

This commit is contained in:
Markus Birth 2017-10-05 16:21:48 +02:00
parent f324f4d283
commit ab18cc66c5
2 changed files with 4 additions and 2 deletions

View File

@ -31,8 +31,8 @@ while len(prds) > 0:
check_xml = fc.do_check() check_xml = fc.do_check()
curef, fv, tv, fw_id, fileid, fn, fsize, fhash = fc.parse_check(check_xml) curef, fv, tv, fw_id, fileid, fn, fsize, fhash = fc.parse_check(check_xml)
txt_tv = tv txt_tv = tv
if fc.mode == fc.MODE_OTA: if tv != lastver:
txt_tv = "{}{}".format(fv, tv) txt_tv = tcllib.ANSI_WHITE + txt_tv + tcllib.ANSI_RESET
print("{}: {} {} ({})".format(prd, txt_tv, fhash, model)) print("{}: {} {} ({})".format(prd, txt_tv, fhash, model))
prds.pop(0) prds.pop(0)
except Timeout as e: except Timeout as e:

View File

@ -19,6 +19,8 @@ except (ImportError, AttributeError):
import requests import requests
ANSI_UP_DEL = u"\u001b[F\u001b[K" ANSI_UP_DEL = u"\u001b[F\u001b[K"
ANSI_WHITE = u"\u001b[1;37m"
ANSI_RESET = u"\u001b[0m"
def make_escapes_work(): def make_escapes_work():
system = platform.system() system = platform.system()