diff --git a/tclcheck_allfull.py b/tclcheck_allfull.py index e74c85e..4262fa8 100755 --- a/tclcheck_allfull.py +++ b/tclcheck_allfull.py @@ -30,9 +30,9 @@ print(" OK") print("List of latest FULL firmware by PRD:") -for prd in prds: - model = prds[prd]["variant"] - lastver = prds[prd]["last_full"] +for prd, variant in prds.items(): + model = variant["variant"] + lastver = variant["last_full"] if prdcheck in prd: try: fc.reset_session() @@ -41,7 +41,7 @@ for prd in prds: 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(prds[prd]["last_ota"]) + txt_tv = tcllib.ANSI_CYAN + txt_tv + tcllib.ANSI_RESET + " (OTA: {})".format(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 index 9a63097..45eca86 100755 --- a/tclcheck_allota.py +++ b/tclcheck_allota.py @@ -35,9 +35,9 @@ print(" OK") print("List of latest OTA firmware{} by PRD:".format(force_ver_text)) -for prd in prds: - model = prds[prd]["variant"] - lastver = prds[prd]["last_ota"] +for prd, variant in prds.items(): + model = variant["variant"] + lastver = variant["last_ota"] if args.forcever is not None: lastver = args.forcever if prdcheck in prd: @@ -47,7 +47,7 @@ for prd in prds: 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(prds[prd]["last_full"]) + versioninfo = tcllib.ANSI_CYAN_DARK + fv + tcllib.ANSI_RESET + " ⇨ " + tcllib.ANSI_CYAN + 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)))