Skip to content

Commit 8d5b7f9

Browse files
committed
SWPROT-9959: Fix ZLF rotation file listing in _list_rotated_files
Correct a typo in the except clause and append parsed rotation indices so rotation can enumerate existing files.
1 parent 6a71b20 commit 8d5b7f9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

z_wave_ts_silabs/zlf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ def _list_rotated_files(base: Path, compressed: bool) -> list[tuple[int, Path]]:
5353
continue
5454
try:
5555
idx_str = name[len(stem_name) + 1 :]
56-
it ValueError:
56+
idx = int(idx_str)
57+
except ValueError:
5758
continue
59+
result.append((idx, f))
5860
result.sort(key=lambda x: x[0], reverse=True)
5961
return result
6062

0 commit comments

Comments
 (0)