mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-11 22:24:35 +00:00
[#104 state:fixed] Fixed str/bytes mixup in HTML export.
This commit is contained in:
parent
d10210011f
commit
36f3638ae4
@ -6,7 +6,6 @@
|
|||||||
# which should be included with this package. The terms are also available at
|
# which should be included with this package. The terms are also available at
|
||||||
# http://www.hardcoded.net/licenses/hs_license
|
# http://www.hardcoded.net/licenses/hs_license
|
||||||
|
|
||||||
import tempfile
|
|
||||||
import os.path as op
|
import os.path as op
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
|
|
||||||
@ -131,7 +130,7 @@ def export_to_xhtml(colnames, rows):
|
|||||||
content = MAIN_TEMPLATE.replace('$colheaders', colheaders).replace('$rows', rendered_rows)
|
content = MAIN_TEMPLATE.replace('$colheaders', colheaders).replace('$rows', rendered_rows)
|
||||||
folder = mkdtemp()
|
folder = mkdtemp()
|
||||||
destpath = op.join(folder, 'export.htm')
|
destpath = op.join(folder, 'export.htm')
|
||||||
fp = open(destpath, 'w')
|
fp = open(destpath, 'wt', encoding='utf-8')
|
||||||
fp.write(content.encode('utf-8'))
|
fp.write(content)
|
||||||
fp.close()
|
fp.close()
|
||||||
return destpath
|
return destpath
|
||||||
|
Loading…
x
Reference in New Issue
Block a user