From 92813c604c26a3993321bd5b1a3aa47997962104 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Sat, 13 Jan 2018 16:04:41 +0100 Subject: [PATCH] Fix bug with NoneType error when printing out changes list. --- tcllib.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tcllib.py b/tcllib.py index fddea80..a0039ba 100644 --- a/tcllib.py +++ b/tcllib.py @@ -289,15 +289,15 @@ class FotaCheck: if pdata["last_full"] != odata["last_full"] and pdata["last_ota"] != odata["last_ota"]: print("> {}: {} ⇨ {} (OTA: {} ⇨ {})".format( prd, - ANSI_CYAN_DARK + odata["last_full"] + ANSI_RESET, - ANSI_CYAN + pdata["last_full"] + ANSI_RESET, - ANSI_YELLOW_DARK + odata["last_ota"] + ANSI_RESET, - ANSI_YELLOW + pdata["last_ota"] + ANSI_RESET + ANSI_CYAN_DARK + str(odata["last_full"]) + ANSI_RESET, + ANSI_CYAN + str(pdata["last_full"]) + ANSI_RESET, + ANSI_YELLOW_DARK + str(odata["last_ota"]) + ANSI_RESET, + ANSI_YELLOW + str(pdata["last_ota"]) + ANSI_RESET )) elif pdata["last_full"] != odata["last_full"]: - print("> {}: {} ⇨ {} (FULL)".format(prd, ANSI_CYAN_DARK + odata["last_full"] + ANSI_RESET, ANSI_CYAN + pdata["last_full"] + ANSI_RESET)) + print("> {}: {} ⇨ {} (FULL)".format(prd, ANSI_CYAN_DARK + str(odata["last_full"]) + ANSI_RESET, ANSI_CYAN + str(pdata["last_full"]) + ANSI_RESET)) elif pdata["last_ota"] != odata["last_ota"]: - print("> {}: {} ⇨ {} (OTA)".format(prd, ANSI_YELLOW_DARK + odata["last_ota"] + ANSI_RESET, ANSI_YELLOW + pdata["last_ota"] + ANSI_RESET)) + print("> {}: {} ⇨ {} (OTA)".format(prd, ANSI_YELLOW_DARK + str(odata["last_ota"]) + ANSI_RESET, ANSI_YELLOW + str(pdata["last_ota"]) + ANSI_RESET)) @staticmethod def get_creds():