[Schematic v5] Better error message when mixing v5/6 files
Related to #298
This commit is contained in:
parent
49b21c8e93
commit
39eabd996f
|
|
@ -686,6 +686,8 @@ class SymLib(object):
|
||||||
f = LibLineReader(fh, file)
|
f = LibLineReader(fh, file)
|
||||||
line = f.get_line()
|
line = f.get_line()
|
||||||
if not line.startswith('EESchema-LIBRARY'):
|
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)
|
raise SchLibError('Missing library signature', line, f)
|
||||||
line = f.get_line()
|
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
|
translate = {k.replace(':', '_'): k for k, v in needed.items() if v is None} if lib_alias is None else None
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue