summaryrefslogtreecommitdiff
path: root/gerber/excellon.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-01-16 18:33:40 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-01-16 18:33:40 +0800
commit60784dfa2107f72fcaeed739b835d647e4c3a7a9 (patch)
treee131ed2a0440f98d197e65977acf8bb82031a04e /gerber/excellon.py
parent6a993594130c42adffa9e2d58757b66b48755aad (diff)
downloadgerbonara-60784dfa2107f72fcaeed739b835d647e4c3a7a9.tar.gz
gerbonara-60784dfa2107f72fcaeed739b835d647e4c3a7a9.tar.bz2
gerbonara-60784dfa2107f72fcaeed739b835d647e4c3a7a9.zip
Skip over a strange excellon statement
Diffstat (limited to 'gerber/excellon.py')
-rwxr-xr-xgerber/excellon.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/gerber/excellon.py b/gerber/excellon.py
index cdd6d8d..4317e41 100755
--- a/gerber/excellon.py
+++ b/gerber/excellon.py
@@ -500,9 +500,12 @@ class ExcellonParser(object):
self.statements.append(infeed_rate_stmt)
elif line[0] == 'T' and self.state == 'HEADER':
- tool = ExcellonTool.from_excellon(line, self._settings())
- self.tools[tool.number] = tool
- self.statements.append(tool)
+ if not ',OFF' in line and not ',ON' in line:
+ tool = ExcellonTool.from_excellon(line, self._settings())
+ self.tools[tool.number] = tool
+ self.statements.append(tool)
+ else:
+ self.statements.append(UnknownStmt.from_excellon(line))
elif line[0] == 'T' and self.state != 'HEADER':
stmt = ToolSelectionStmt.from_excellon(line)