From 123bbb24cafecf0ee5cffcfc0279f06d2a4aa818 Mon Sep 17 00:00:00 2001 From: "Pierre R. Mai" Date: Fri, 5 Apr 2024 16:02:22 +0200 Subject: [PATCH] Fix precedence error in retrieve_offsets As noted by @ClemensLinnhoff there is a precedence error in retrieve_offsets of osi3trace which results in errors if the function is called again after a complete read. Signed-off-by: Pierre R. Mai --- osi3trace/osi_trace.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osi3trace/osi_trace.py b/osi3trace/osi_trace.py index 49453c660..3963cb48a 100644 --- a/osi3trace/osi_trace.py +++ b/osi3trace/osi_trace.py @@ -54,8 +54,8 @@ def retrieve_offsets(self, limit=None): if not self.read_complete: self.current_index = len(self.message_offsets) - 1 self.file.seek(self.message_offsets[-1], 0) - while ( - not self.read_complete and not limit or len(self.message_offsets) <= limit + while not self.read_complete and ( + not limit or len(self.message_offsets) <= limit ): self.retrieve_message(skip=True) return self.message_offsets