Fix serialization bug with aperture macro comments

This commit is contained in:
jaseg 2023-04-19 11:11:03 +02:00
parent 2c6c9a5cbc
commit 240e5569aa

View file

@ -120,7 +120,7 @@ class ApertureMacro:
return dup
def to_gerber(self, unit=None):
comments = [ c.to_gerber() for c in self.comments ]
comments = [ str(c) for c in self.comments ]
variable_defs = [ f'${var.to_gerber(unit)}={expr}' for var, expr in self.variables.items() ]
primitive_defs = [ prim.to_gerber(unit) for prim in self.primitives ]
return '*\n'.join(comments + variable_defs + primitive_defs)