Skip to content

Commit d696018

Browse files
committed
Add None handling for first_timestamp
1 parent 39e8a01 commit d696018

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

can/io/trc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def _format_message(self, msg: Message, channel: int) -> str:
389389

390390
serialized = self._msg_fmt_string.format(
391391
msgnr=self.msgnr,
392-
time=(msg.timestamp - self.first_timestamp) * 1000,
392+
time=(msg.timestamp - (self.first_timestamp or 0.0)) * 1000,
393393
channel=channel,
394394
id=arb_id,
395395
dir="Rx" if msg.is_rx else "Tx",

0 commit comments

Comments
 (0)