fix: avoid error on empty command lines
This commit is contained in:
parent
c19d59492a
commit
32fa6353f3
1 changed files with 2 additions and 0 deletions
|
@ -57,6 +57,8 @@ class SRTMerger:
|
||||||
}
|
}
|
||||||
for line_number, line in enumerate(lines, start=1):
|
for line_number, line in enumerate(lines, start=1):
|
||||||
parts = SRTMerger.split_line(line)
|
parts = SRTMerger.split_line(line)
|
||||||
|
if not parts:
|
||||||
|
continue
|
||||||
command = parts[0].upper()
|
command = parts[0].upper()
|
||||||
if command not in supported:
|
if command not in supported:
|
||||||
errors.append(f"Line {line_number}: unknown command '{command}'.")
|
errors.append(f"Line {line_number}: unknown command '{command}'.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue