v6 loader: catch case were the file is just a word

This commit is contained in:
Diego Capusotto 2021-12-18 12:09:51 -03:00
parent 46378b992b
commit 08ef3e847a
1 changed files with 1 additions and 1 deletions

View File

@ -1049,7 +1049,7 @@ class SchematicV6(Schematic):
error = str(e)
if error:
raise SchError(error)
if sch[0].value() != 'kicad_sch':
if not isinstance(sch, list) or sch[0].value() != 'kicad_sch':
raise SchError('No kicad_sch signature')
for e in sch[1:]:
e_type = _check_is_symbol_list(e)