Added support to detect KiCad 6 schematics.

This commit is contained in:
Salvador E. Tropea 2020-10-15 18:53:15 -03:00
parent b535ebaeb2
commit 17dd1d1be6
1 changed files with 7 additions and 2 deletions

View File

@ -131,11 +131,16 @@ def list_pre_and_outs(logger, outputs):
def solve_schematic(a_schematic, a_board_file):
schematic = a_schematic
if not schematic and a_board_file:
sch = os.path.splitext(a_board_file)[0]+'.sch'
base = os.path.splitext(a_board_file)[0]
sch = base+'.sch'
if os.path.isfile(sch):
schematic = sch
else:
sch = base+'.kicad_sch'
if os.path.isfile(sch):
schematic = sch
if not schematic:
schematics = glob('*.sch')
schematics = glob('*.sch')+glob('*.kicad_sch')
if len(schematics) == 1:
schematic = schematics[0]
logger.info('Using SCH file: '+schematic)