empty lines trip up if i[-1]..., move within try: ... except: ...
This commit is contained in:
parent
cc4ae66345
commit
41565af01f
|
@ -53,9 +53,9 @@ class RecordCollection():
|
|||
raise FileParsingError(f"error parsing '{i}'")
|
||||
|
||||
else:
|
||||
if i[-1] != ":":
|
||||
raise FileParsingError(f"colon must be on last character of '{i}'")
|
||||
try:
|
||||
if i[-1] != ":":
|
||||
raise FileParsingError(f"colon must be on last character of '{i}'")
|
||||
name = i.split(' ')[1][0:-1]
|
||||
except IndexError:
|
||||
current = Record()
|
||||
|
|
Loading…
Reference in New Issue