summaryrefslogtreecommitdiff
path: root/gerber/render.py
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2014-10-21 20:46:37 -0200
committerPaulo Henrique Silva <ph.silva@gmail.com>2014-10-21 20:46:37 -0200
commit0d4cb55c97a6f417f65e458093f3f2a9c36a421f (patch)
tree4ebe1587a6df616899c546690e132bfa4b6d4800 /gerber/render.py
parentcb18cc4635afa14a1dd61bd9a678d8f28aadc38a (diff)
downloadgerbonara-0d4cb55c97a6f417f65e458093f3f2a9c36a421f.tar.gz
gerbonara-0d4cb55c97a6f417f65e458093f3f2a9c36a421f.tar.bz2
gerbonara-0d4cb55c97a6f417f65e458093f3f2a9c36a421f.zip
Fix parsing when x or y coordinate is missing on COORD statement
Diffstat (limited to 'gerber/render.py')
-rw-r--r--gerber/render.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gerber/render.py b/gerber/render.py
index 8accf09..c6f086a 100644
--- a/gerber/render.py
+++ b/gerber/render.py
@@ -41,8 +41,8 @@ class GerberCoordFormat(object):
self.y_int_digits, self.y_dec_digits = [int(d) for d in y]
def resolve(self, x, y):
- new_x = x.replace("+", "")
- new_y = y.replace("+", "")
+ new_x = x.replace("+", "") if x else None
+ new_y = y.replace("+", "") if y else None
if new_x is not None:
negative = "-" in new_x