[#104 state:fixed] Fixed str/bytes mixup in HTML export.

This commit is contained in:
Virgil Dupras 2010-08-21 16:34:35 +02:00
parent d10210011f
commit 36f3638ae4
1 changed files with 2 additions and 3 deletions

View File

@ -6,7 +6,6 @@
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/hs_license
import tempfile
import os.path as op
from tempfile import mkdtemp
@ -131,7 +130,7 @@ def export_to_xhtml(colnames, rows):
content = MAIN_TEMPLATE.replace('$colheaders', colheaders).replace('$rows', rendered_rows)
folder = mkdtemp()
destpath = op.join(folder, 'export.htm')
fp = open(destpath, 'w')
fp.write(content.encode('utf-8'))
fp = open(destpath, 'wt', encoding='utf-8')
fp.write(content)
fp.close()
return destpath