From ee47d4906b67baca9987152b062103e746ae4e36 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 4d0699dbf..2b54e6d44 100644 --- a/osi3trace/osi_trace.py +++ b/osi3trace/osi_trace.py @@ -55,8 +55,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