From 17dd1d1be682ef17699b549722371dffce6043fb Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Thu, 15 Oct 2020 18:53:15 -0300 Subject: [PATCH] Added support to detect KiCad 6 schematics. --- kibot/__main__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kibot/__main__.py b/kibot/__main__.py index 906bdecd..52e40606 100644 --- a/kibot/__main__.py +++ b/kibot/__main__.py @@ -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)