summaryrefslogtreecommitdiff
path: root/gerber/render/cairo_backend.py
diff options
context:
space:
mode:
authorJan Margeta <jmargeta@gmail.com>2017-04-15 14:53:08 +0200
committerJan Margeta <jmargeta@gmail.com>2017-04-15 15:29:58 +0200
commit787399992662f1963cfbd2dd9e9b9002b6b131e4 (patch)
tree71529524b19cc0edc5b31222fa74a799f977b56d /gerber/render/cairo_backend.py
parentdd0abbf3072b59c8e5ec437a85ccaf01272d8043 (diff)
downloadgerbonara-787399992662f1963cfbd2dd9e9b9002b6b131e4.tar.gz
gerbonara-787399992662f1963cfbd2dd9e9b9002b6b131e4.tar.bz2
gerbonara-787399992662f1963cfbd2dd9e9b9002b6b131e4.zip
Fix Cairo backend for svg saving and Python 3
Diffstat (limited to 'gerber/render/cairo_backend.py')
-rw-r--r--gerber/render/cairo_backend.py2
1 files changed, 1 insertions, 1 deletions
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()