summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-07-03 22:49:00 +0200
committerjaseg <git@jaseg.de>2022-07-03 22:49:09 +0200
commit8f4cdd881063cf68e6535e96e098d07bef0ffa37 (patch)
tree52de966489a621f98166187e407924eeab82b6d4
parent791eca7679f273a6ddb9d02739619e38194e9c99 (diff)
downloadgerbonara-8f4cdd881063cf68e6535e96e098d07bef0ffa37.tar.gz
gerbonara-8f4cdd881063cf68e6535e96e098d07bef0ffa37.tar.bz2
gerbonara-8f4cdd881063cf68e6535e96e098d07bef0ffa37.zip
Fix zipfile writing when lazily loading
-rw-r--r--gerbonara/layers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gerbonara/layers.py b/gerbonara/layers.py
index a64fffa..a738a45 100644
--- a/gerbonara/layers.py
+++ b/gerbonara/layers.py
@@ -426,7 +426,7 @@ class LayerStack:
with ZipFile(path, 'w') as le_zip:
for path, layer in self._save_files_iter(naming_scheme=naming_scheme):
with le_zip.open(prefix + str(path), 'w') as out:
- out.write(layer.write_to_bytes())
+ out.write(layer.instance.write_to_bytes())
def save_to_directory(self, path, naming_scheme={}, overwrite_existing=True):
outdir = Path(path)
@@ -436,7 +436,7 @@ class LayerStack:
out = outdir / path
if out.exists() and not overwrite_existing:
raise SystemError(f'Path exists but overwrite_existing is False: {out}')
- layer.save(out)
+ layer.instance.save(out)
def _save_files_iter(self, naming_scheme={}):
def get_name(layer_type, layer):