summaryrefslogtreecommitdiff
path: root/gerber/render
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2017-06-12 07:58:59 -0400
committerGitHub <noreply@github.com>2017-06-12 07:58:59 -0400
commitb85021d9b882136635ab4bd269fd983aa0533321 (patch)
treeadf9b6a73431fc998f749853f226634f7a07a55d /gerber/render
parentf7a719e6f72dc80c34bd6a1015e81f0d2b370689 (diff)
parent787399992662f1963cfbd2dd9e9b9002b6b131e4 (diff)
downloadgerbonara-b85021d9b882136635ab4bd269fd983aa0533321.tar.gz
gerbonara-b85021d9b882136635ab4bd269fd983aa0533321.tar.bz2
gerbonara-b85021d9b882136635ab4bd269fd983aa0533321.zip
Merge pull request #68 from jmargeta/cairo_python_3_fix
Fix Cairo backend for svg saving and Python 3
Diffstat (limited to 'gerber/render')
-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 7c97cc9..3571ed9 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()