From 787399992662f1963cfbd2dd9e9b9002b6b131e4 Mon Sep 17 00:00:00 2001 From: Jan Margeta Date: Sat, 15 Apr 2017 14:53:08 +0200 Subject: Fix Cairo backend for svg saving and Python 3 --- gerber/render/cairo_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gerber/render') diff --git a/gerber/render/cairo_backend.py b/gerber/render/cairo_backend.py index 76be60a..8b6c81e 100644 --- a/gerber/render/cairo_backend.py +++ b/gerber/render/cairo_backend.py @@ -139,7 +139,7 @@ class GerberCairoContext(GerberContext): if is_svg: self.surface.finish() self.surface_buffer.flush() - with open(filename, "w") as f: + with open(filename, "wb") as f: self.surface_buffer.seek(0) f.write(self.surface_buffer.read()) f.flush() -- cgit