1
0
mirror of synced 2025-02-03 13:13:26 +01:00

parsers.py: Handle incorrectly specified balloon metadata

Carmen Prelude's .tja had "30,10," which would be parsed as ['30', '10', '']. We don't want that last value, so we exclude empty values.
This commit is contained in:
Viv 2023-06-02 16:35:05 -04:00
parent 8b3a56ef0d
commit f5df104e56

View File

@ -94,7 +94,7 @@ def getCourse(tjaHeaders, lines):
headers['scoreDiff'] = int(line['value']) if line['value'] else 0
elif line["name"] == 'BALLOON':
if line['value']:
balloons = [int(v) for v in line['value'].split(",")]
balloons = [int(v) for v in line['value'].split(",") if v]
else:
balloons = []
headers['balloon'] = balloons