Fix parsing when x or y coordinate is missing on COORD statement

This commit is contained in:
Paulo Henrique Silva 2014-10-21 20:46:37 -02:00
parent cb18cc4635
commit 0d4cb55c97

View file

@ -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