From 99b4fd7912f9b0e0a0eec2d1355cc3fc9f05bae3 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Wed, 20 Dec 2017 00:00:28 +0100 Subject: [PATCH] Output old version for FULL search as well. Also: colour coding - OTA=yellow, FULL=cyan --- tclcheck_allfull.py | 6 +++++- tclcheck_allota.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) mode change 100755 => 100644 tclcheck_allfull.py mode change 100755 => 100644 tclcheck_allota.py diff --git a/tclcheck_allfull.py b/tclcheck_allfull.py old mode 100755 new mode 100644 index 4262fa8..b1939d8 --- a/tclcheck_allfull.py +++ b/tclcheck_allfull.py @@ -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))) diff --git a/tclcheck_allota.py b/tclcheck_allota.py old mode 100755 new mode 100644 index c9a224f..67c6158 --- a/tclcheck_allota.py +++ b/tclcheck_allota.py @@ -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)))