aboutsummaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rwxr-xr-xpy/kicad_gerber.py13
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