From 15fd302bcfd1519b3ea141a71deba0b864204765 Mon Sep 17 00:00:00 2001 From: MH2033 <5557100+MH2033@users.noreply.github.com> Date: Tue, 10 Feb 2026 15:52:06 +0100 Subject: [PATCH] Expose the flush method --- can/io/blf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/can/io/blf.py b/can/io/blf.py index fe3188c28..2c2d79a1e 100644 --- a/can/io/blf.py +++ b/can/io/blf.py @@ -660,9 +660,9 @@ def _add_object(self, obj_type, data, timestamp=None): self._buffer_size += obj_size + padding_size self.object_count += 1 if self._buffer_size >= self.max_container_size: - self._flush() + self.flush() - def _flush(self): + def flush(self): """Compresses and writes data in the buffer to file.""" if self.file.closed: return @@ -701,7 +701,7 @@ def file_size(self) -> int: def stop(self): """Stops logging and closes the file.""" - self._flush() + self.flush() if self.file.seekable(): filesize = self.file.tell() # Write header in the beginning of the file