Fix mystery crashes in excellon parser
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.
This commit is contained in:
parent
3f9295b9d0
commit
71c371ca68
1 changed files with 3 additions and 3 deletions
|
|
@ -114,8 +114,8 @@ class ExcellonFileEx(ExcellonFile):
|
||||||
if isinstance(stmt, ToolSelectionStmt):
|
if isinstance(stmt, ToolSelectionStmt):
|
||||||
current_tool = file.tools[stmt.tool]
|
current_tool = file.tools[stmt.tool]
|
||||||
elif isinstance(stmt, DrillModeStmt):
|
elif isinstance(stmt, DrillModeStmt):
|
||||||
rout = make_rout(status, rout_statements)
|
rout = make_rout(status, rout_nodes)
|
||||||
rout_statements = []
|
rout_nodes = []
|
||||||
if rout is not None:
|
if rout is not None:
|
||||||
yield rout
|
yield rout
|
||||||
status = STAT_DRILL
|
status = STAT_DRILL
|
||||||
|
|
@ -137,7 +137,7 @@ class ExcellonFileEx(ExcellonFile):
|
||||||
status = STAT_ROUT_DOWN
|
status = STAT_ROUT_DOWN
|
||||||
elif isinstance(stmt, RetractWithClampingStmt) or isinstance(stmt, RetractWithoutClampingStmt):
|
elif isinstance(stmt, RetractWithClampingStmt) or isinstance(stmt, RetractWithoutClampingStmt):
|
||||||
rout = make_rout(status, rout_nodes)
|
rout = make_rout(status, rout_nodes)
|
||||||
rout_statements = []
|
rout_nodes = []
|
||||||
if rout is not None:
|
if rout is not None:
|
||||||
yield rout
|
yield rout
|
||||||
status = STAT_ROUT_UP
|
status = STAT_ROUT_UP
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue