From 4de1811d0258900099eab778a0ec01931d5bd21d Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 1 Jul 2018 00:15:54 +0200 Subject: o Using '-PTH.drl' suffix for drill files. Not quite sure why this wasn't a problem before, but the index file included a file that wasn't generated and then the CMake code that created the zip missed the PTH drill file today. --- py/kicad_gerber.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/py/kicad_gerber.py b/py/kicad_gerber.py index f57be9a..511f9ee 100755 --- a/py/kicad_gerber.py +++ b/py/kicad_gerber.py @@ -129,7 +129,7 @@ popt.SetUseGerberProtelExtensions(args.protel_extensions) basename = os.path.splitext(filename)[0] -drlFileOut = drlFile = basename + ".drl" +drlFileOut = drlFile = basename + "-PTH.drl" drlNpthFileOut = drlNpthFile = basename + "-NPTH.drl" if args.uppercase_extensions: @@ -243,10 +243,17 @@ genMap = args.create_drill_map_file drlwriter.CreateDrillandMapFilesSet(pctl.GetPlotDirName(), genDrl, genMap) +# This has to be verified that this is the right way to do it. +if False: +# Check that the drill files actually was generated + if not os.path.isfile(drlFile): + print("No drill file generated: {}".format(drlFile), file=sys.stderr) + + if not os.path.isfile(drlNpthFile): + print("No drill file generated: {}".format(drlNpthFile), file=sys.stderr) + if drlFile != drlFileOut: os.rename(drlFile, drlFileOut) - pass if drlNpthFile != drlNpthFileOut: os.rename(drlNpthFile, drlNpthFileOut) - pass -- cgit v1.2.3