From e492dd391d8b8171e88737c605e51c6c843f1b5b Mon Sep 17 00:00:00 2001 From: Mike Kazantsev Date: Tue, 20 Aug 2024 17:28:45 +0500 Subject: [PATCH] znc-log-reader: fix crash when sorting msgs with None values in them --- znc-log-reader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/znc-log-reader b/znc-log-reader index 41fc33d..c105215 100755 --- a/znc-log-reader +++ b/znc-log-reader @@ -274,7 +274,7 @@ def open_log_iterators(ctx, log_map, ts_a, ts_b): if not (line_iter := IterLog(p, ts, ts_a, ts_b).get_iter()): continue ctx.enter_context(line_iter) # id value is there to make sure sort never reaches iterators - logs.append((net, chan, line_iter.ts0, id(line_iter), line_iter)) + logs.append((net or '', chan or '', line_iter.ts0, id(line_iter), line_iter)) logs.sort() return list((net, chan, line_iter) for net, chan, ts0, iter_id, line_iter in logs)