From 0d4cb55c97a6f417f65e458093f3f2a9c36a421f Mon Sep 17 00:00:00 2001 From: Paulo Henrique Silva Date: Tue, 21 Oct 2014 20:46:37 -0200 Subject: Fix parsing when x or y coordinate is missing on COORD statement --- gerber/render.py | 4 ++-- 1 file 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 -- cgit