Skip to content

Commit

Permalink
Fix #5: Error generating py3o documents under py3
Browse files Browse the repository at this point in the history
  • Loading branch information
G.Tjebbes committed Nov 1, 2020
1 parent 314fd7e commit b9032ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqla_inspect/py3o.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
>>> odt_file_datas = compile_template(model, template.data_obj)
"""
from __future__ import absolute_import
from io import StringIO
from io import BytesIO

from xml.sax.saxutils import escape

Expand Down Expand Up @@ -380,7 +380,7 @@ def compile_template(instance, template, additionnal_context=None):
if additionnal_context is not None:
py3o_context.update(additionnal_context)

output_doc = StringIO()
output_doc = BytesIO()

odt_builder = Template(template, output_doc)
odt_builder.render(py3o_context)
Expand Down

0 comments on commit b9032ca

Please sign in to comment.