From b05eb1e8e37fb3c3cfb558153cdb2f97a1a3c82c Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 29 Dec 2017 15:17:11 -0500 Subject: [PATCH] logextract: Fix handling of messages with retransmits Properly handle the case where the original sequence number of a message is not known. Signed-off-by: Kevin O'Connor --- scripts/logextract.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/logextract.py b/scripts/logextract.py index 07c12cc7..414782dd 100755 --- a/scripts/logextract.py +++ b/scripts/logextract.py @@ -103,7 +103,8 @@ class GatherShutdown: ext_clock = add_high_bits(clock, exp_clock, 0xffffffff) return sample_time + (ext_clock - sample_clock) / freq def annotate(self, line, seq, ts): - line = repl_seq_r.sub(r"\g<0>(%d)" % (seq,), line) + if seq is not None: + line = repl_seq_r.sub(r"\g<0>(%d)" % (seq,), line) def clock_update(m): return m.group(0)[:-1] + "(%.6f) " % ( self.trans_clock(int(m.group('clock')), ts),)