aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-02-06 09:38:49 +0100
committerjaseg <git@jaseg.de>2021-02-06 09:38:49 +0100
commit71c371ca680483aa9ef18d2998832460dd43abdf (patch)
tree93aa74d17f879e4d1b63ea193850e36379bd914d
parent3f9295b9d0c2142c46aa238836debdd472811899 (diff)
downloadpcb-tools-extension-master.tar.gz
pcb-tools-extension-master.tar.bz2
pcb-tools-extension-master.zip
Fix mystery crashes in excellon parserHEADmaster
I don't know this code and I don't get what was intended here, but it makes way more sense to me this way.
-rw-r--r--gerberex/excellon.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gerberex/excellon.py b/gerberex/excellon.py
index 570f94e..f7787d3 100644
--- a/gerberex/excellon.py
+++ b/gerberex/excellon.py
@@ -114,8 +114,8 @@ class ExcellonFileEx(ExcellonFile):
if isinstance(stmt, ToolSelectionStmt):
current_tool = file.tools[stmt.tool]
elif isinstance(stmt, DrillModeStmt):
- rout = make_rout(status, rout_statements)
- rout_statements = []
+ rout = make_rout(status, rout_nodes)
+ rout_nodes = []
if rout is not None:
yield rout
status = STAT_DRILL
@@ -137,7 +137,7 @@ class ExcellonFileEx(ExcellonFile):
status = STAT_ROUT_DOWN
elif isinstance(stmt, RetractWithClampingStmt) or isinstance(stmt, RetractWithoutClampingStmt):
rout = make_rout(status, rout_nodes)
- rout_statements = []
+ rout_nodes = []
if rout is not None:
yield rout
status = STAT_ROUT_UP