From a4344915d36cdeb3a60760077a702184d1fa105d Mon Sep 17 00:00:00 2001 From: Pete Savage Date: Fri, 6 Dec 2024 15:30:36 +0000 Subject: [PATCH] Fix controller log parse --- parse-controller-logs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parse-controller-logs b/parse-controller-logs index f167db96a..0f1df22ae 100755 --- a/parse-controller-logs +++ b/parse-controller-logs @@ -17,7 +17,7 @@ levels = { cancel_colour = '\033[0m' def col_wrap(stri, collev): - return levels["key"] + stri + collev + return levels.get("key","") + stri + collev filters = {sp[0]: sp[1] for sp in [arg.split(":", 1) for arg in sys.argv[1:]]} @@ -26,9 +26,9 @@ def print_message(line): string = "" if 'level' in js: - collev = levels[js['level']] + collev = levels.get(js['level'], "") elif js.get('diff') != None: - collev = levels['diff'] + collev = levels.get('diff', "") else: collev = cancel_colour