ubuntutools/requestsync/common.py: write the report into the tempfile encoded as utf-8

This commit is contained in:
Michael Bienia 2009-12-23 00:03:58 +01:00
parent acd67abdb5
commit 0d0b21b353

View File

@ -101,7 +101,7 @@ def edit_report(subject, body, changes_required = False):
if not editing_finished:
# Create tempfile and remember mtime
report_file = tempfile.NamedTemporaryFile(prefix='requestsync_')
report_file.write(report)
report_file.write(report.encode('utf-8'))
report_file.flush()
mtime_before = os.stat(report_file.name).st_mtime