summaryrefslogtreecommitdiff
path: root/gerbonara/cad/kicad/footprints.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerbonara/cad/kicad/footprints.py')
-rw-r--r--gerbonara/cad/kicad/footprints.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gerbonara/cad/kicad/footprints.py b/gerbonara/cad/kicad/footprints.py
index 1be4d3c..a31d90f 100644
--- a/gerbonara/cad/kicad/footprints.py
+++ b/gerbonara/cad/kicad/footprints.py
@@ -604,7 +604,10 @@ class Footprint:
def write(self, filename=None):
with open(filename or self.original_filename, 'w') as f:
- f.write(build_sexp(sexp(self)))
+ f.write(self.serialize())
+
+ def serialize(self):
+ return build_sexp(sexp(type(self), self)[0])
@classmethod
def open_pretty(kls, pretty_dir, fp_name, *args, **kwargs):