[Schematic v5] Better error message when mixing v5/6 files

Related to #298
This commit is contained in:
Salvador E. Tropea 2022-09-20 09:18:25 -03:00
parent 49b21c8e93
commit 39eabd996f
1 changed files with 2 additions and 0 deletions

View File

@ -686,6 +686,8 @@ class SymLib(object):
f = LibLineReader(fh, file)
line = f.get_line()
if not line.startswith('EESchema-LIBRARY'):
if file.endswith('kicad_sym'):
raise SchLibError('Mixing KiCad 5 and KiCad 6 files is not allowed', line, f)
raise SchLibError('Missing library signature', line, f)
line = f.get_line()
translate = {k.replace(':', '_'): k for k, v in needed.items() if v is None} if lib_alias is None else None