diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-07-01 00:15:54 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-07-01 00:15:54 +0200 |
commit | 4de1811d0258900099eab778a0ec01931d5bd21d (patch) | |
tree | dde697c25457a98e044af717de6eb6473cbd6425 /py | |
parent | b0a809f3b9892b4cb02126996e454e9a494a14c4 (diff) | |
download | kicad-utils-4de1811d0258900099eab778a0ec01931d5bd21d.tar.gz kicad-utils-4de1811d0258900099eab778a0ec01931d5bd21d.tar.bz2 kicad-utils-4de1811d0258900099eab778a0ec01931d5bd21d.tar.xz kicad-utils-4de1811d0258900099eab778a0ec01931d5bd21d.zip |
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.
Diffstat (limited to 'py')
-rwxr-xr-x | py/kicad_gerber.py | 13 |
1 files 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 |