[ck2cti] Fix handling of transport comments with no preceding space

This commit is contained in:
Ray Speth 2013-06-17 14:20:38 +00:00
parent 0018acd607
commit 67240c4947

View file

@ -1560,13 +1560,13 @@ class Parser(object):
if get_index(line, 'END') == 0:
break
data = line.split()
if '!' in line:
line, comment = line.split('!', 1)
data = line.split() + [comment]
else:
data = line.split()
if len(data) < 7:
raise InputParseError('Unable to parse transport data: not enough parameters')
if len(data) >= 8:
# comment may contain spaces. Rejoin into a single field.
comment = ''.join(data[7:]).lstrip('!')
data = data[:7] + [comment]
speciesName = data[0]
if speciesName in self.speciesDict: