summaryrefslogtreecommitdiff
path: root/lib/extensions/output.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-06-13 20:10:22 -0400
committerLex Neva <github.com@lexneva.name>2018-06-15 21:44:52 -0400
commit4c46c2eec1fb7cf9e85617030214bcb170b8b533 (patch)
treee3f21dfc5627a9a80ea3deb5d3f8322e508661cc /lib/extensions/output.py
parentf9a5e4c03a073d403222f0d5b7810cdaab90145a (diff)
fix zip file corruption
Diffstat (limited to 'lib/extensions/output.py')
-rw-r--r--lib/extensions/output.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/extensions/output.py b/lib/extensions/output.py
index 72bbe37d..924c2d3a 100644
--- a/lib/extensions/output.py
+++ b/lib/extensions/output.py
@@ -35,12 +35,14 @@ class Output(InkstitchExtension):
# in windows, failure to close here will keep the file locked
temp_file.close()
+ # libembroidery likes to debug log things to stdout. No way to disable it.
+ save_stdout()
write_embroidery_file(temp_file.name, stitch_plan, self.document.getroot())
# inkscape will read the file contents from stdout and copy
# to the destination file that the user chose
with open(temp_file.name) as output_file:
- sys.stdout.write(output_file.read())
+ sys.real_stdout.write(output_file.read())
# clean up the temp file
os.remove(temp_file.name)