[ck2cti] Fix handling of transport comments with no preceding space
This commit is contained in:
parent
0018acd607
commit
67240c4947
1 changed files with 5 additions and 5 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue