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}'")
|
raise FileParsingError(f"error parsing '{i}'")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
try:
|
||||||
if i[-1] != ":":
|
if i[-1] != ":":
|
||||||
raise FileParsingError(f"colon must be on last character of '{i}'")
|
raise FileParsingError(f"colon must be on last character of '{i}'")
|
||||||
try:
|
|
||||||
name = i.split(' ')[1][0:-1]
|
name = i.split(' ')[1][0:-1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
current = Record()
|
current = Record()
|
||||||
|
|
Loading…
Reference in New Issue