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:
parent
8b3a56ef0d
commit
f5df104e56
@ -94,7 +94,7 @@ def getCourse(tjaHeaders, lines):
|
|||||||
headers['scoreDiff'] = int(line['value']) if line['value'] else 0
|
headers['scoreDiff'] = int(line['value']) if line['value'] else 0
|
||||||
elif line["name"] == 'BALLOON':
|
elif line["name"] == 'BALLOON':
|
||||||
if line['value']:
|
if line['value']:
|
||||||
balloons = [int(v) for v in line['value'].split(",")]
|
balloons = [int(v) for v in line['value'].split(",") if v]
|
||||||
else:
|
else:
|
||||||
balloons = []
|
balloons = []
|
||||||
headers['balloon'] = balloons
|
headers['balloon'] = balloons
|
||||||
|
Loading…
x
Reference in New Issue
Block a user