Skip to content

Commit

Permalink
FIx python error
Browse files Browse the repository at this point in the history
  • Loading branch information
grafnu committed Nov 6, 2024
1 parent 75236b0 commit 382437c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions bin/sequencer_report
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,18 @@ class Sequence:
buffer = []
steps = []

file_lines = text.splitlines()
start_index = first_occurence(file_lines, lambda x: x[:2] == "1.")
sequence_lines = file_lines[start_index:]

for line in reversed(sequence_lines):
buffer.insert(0, line)
if re.match(cls.STEP_PREFIX, line):
steps.insert(0, SequenceStep(buffer.copy()))
buffer.clear()
try:
file_lines = text.splitlines()
start_index = first_occurence(file_lines, lambda x: x[:2] == "1.")
sequence_lines = file_lines[start_index:]

for line in reversed(sequence_lines):
buffer.insert(0, line)
if re.match(cls.STEP_PREFIX, line):
steps.insert(0, SequenceStep(buffer.copy()))
buffer.clear()
except:
pass
return steps

@staticmethod
Expand Down

0 comments on commit 382437c

Please sign in to comment.