1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2024-12-21 10:59:03 +00:00

[#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

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