1
0
mirror of synced 2024-11-27 22:40:49 +01:00

converters.py: Catch errors when missing balloons

This commit is contained in:
Viv 2023-07-23 11:23:35 -04:00
parent ca9b0d0332
commit 9501058b38

View File

@ -336,7 +336,11 @@ def convert_tja_to_fumen(tja):
# Handle drumroll notes
if note.type in ["Balloon", "Kusudama"]:
note.hits = course_balloons.pop(0)
try:
note.hits = course_balloons.pop(0)
except IndexError:
raise ValueError(f"Not enough values for 'BALLOON: "
f"{','.join(course_balloons)}'")
current_drumroll = note
elif note.type in ["Drumroll", "DRUMROLL"]:
current_drumroll = note