From ab18cc66c5479fc33e13c58848a0f281994b829b Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Thu, 5 Oct 2017 16:21:48 +0200 Subject: [PATCH] Highlight full versions different to latest OTA. --- tclcheck_allfull.py | 4 ++-- tcllib.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tclcheck_allfull.py b/tclcheck_allfull.py index 8d95dd4..75273a7 100755 --- a/tclcheck_allfull.py +++ b/tclcheck_allfull.py @@ -31,8 +31,8 @@ while len(prds) > 0: check_xml = fc.do_check() curef, fv, tv, fw_id, fileid, fn, fsize, fhash = fc.parse_check(check_xml) txt_tv = tv - if fc.mode == fc.MODE_OTA: - txt_tv = "{} ⇨ {}".format(fv, tv) + if tv != lastver: + txt_tv = tcllib.ANSI_WHITE + txt_tv + tcllib.ANSI_RESET print("{}: {} {} ({})".format(prd, txt_tv, fhash, model)) prds.pop(0) except Timeout as e: diff --git a/tcllib.py b/tcllib.py index d90fc4e..855824f 100644 --- a/tcllib.py +++ b/tcllib.py @@ -19,6 +19,8 @@ except (ImportError, AttributeError): import requests ANSI_UP_DEL = u"\u001b[F\u001b[K" +ANSI_WHITE = u"\u001b[1;37m" +ANSI_RESET = u"\u001b[0m" def make_escapes_work(): system = platform.system()