Skip to content

Commit

Permalink
znc-log-reader: fix crash when sorting msgs with None values in them
Browse files Browse the repository at this point in the history
  • Loading branch information
mk-fg committed Aug 20, 2024
1 parent 798d502 commit e492dd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion znc-log-reader
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit e492dd3

Please sign in to comment.