summaryrefslogtreecommitdiff
path: root/gerber/excellon.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2015-05-16 09:45:34 -0400
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2015-05-16 09:45:34 -0400
commit8ec3077be988681bbbafcef18ea3a2f84dd61b2b (patch)
tree97b108fe6ca1d128420f58360f9976a3ca0ee0f0 /gerber/excellon.py
parent21d963d244cbc762a736527b25cd8e82ff147f25 (diff)
downloadgerbonara-8ec3077be988681bbbafcef18ea3a2f84dd61b2b.tar.gz
gerbonara-8ec3077be988681bbbafcef18ea3a2f84dd61b2b.tar.bz2
gerbonara-8ec3077be988681bbbafcef18ea3a2f84dd61b2b.zip
Add checks to ensure statement unit conversions are idempotent
Diffstat (limited to 'gerber/excellon.py')
-rwxr-xr-xgerber/excellon.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gerber/excellon.py b/gerber/excellon.py
index 0f70de7..f994b67 100755
--- a/gerber/excellon.py
+++ b/gerber/excellon.py
@@ -219,6 +219,9 @@ class ExcellonParser(object):
with open(filename, 'r') as f:
for line in f:
self._parse(line.strip())
+
+ for stmt in self.statements:
+ stmt.units = self.units
return ExcellonFile(self.statements, self.tools, self.hits,
self._settings(), filename)