1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-11-09 22:06:47 +00:00

Fix bug with NoneType error when printing out changes list.

This commit is contained in:
Markus Birth 2018-01-13 16:04:41 +01:00
parent 827e0ae615
commit 92813c604c
Signed by: mbirth
GPG Key ID: A9928D7A098C3A9A

View File

@ -289,15 +289,15 @@ class FotaCheck:
if pdata["last_full"] != odata["last_full"] and pdata["last_ota"] != odata["last_ota"]: if pdata["last_full"] != odata["last_full"] and pdata["last_ota"] != odata["last_ota"]:
print("> {}: {}{} (OTA: {}{})".format( print("> {}: {}{} (OTA: {}{})".format(
prd, prd,
ANSI_CYAN_DARK + odata["last_full"] + ANSI_RESET, ANSI_CYAN_DARK + str(odata["last_full"]) + ANSI_RESET,
ANSI_CYAN + pdata["last_full"] + ANSI_RESET, ANSI_CYAN + str(pdata["last_full"]) + ANSI_RESET,
ANSI_YELLOW_DARK + odata["last_ota"] + ANSI_RESET, ANSI_YELLOW_DARK + str(odata["last_ota"]) + ANSI_RESET,
ANSI_YELLOW + pdata["last_ota"] + ANSI_RESET ANSI_YELLOW + str(pdata["last_ota"]) + ANSI_RESET
)) ))
elif pdata["last_full"] != odata["last_full"]: 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"]: 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 @staticmethod
def get_creds(): def get_creds():