py3 compat

This commit is contained in:
Kovid Goyal 2020-08-23 14:02:13 +05:30
parent f2ee824706
commit 8f15a04d8a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -224,7 +224,7 @@ class POT(Command): # {{{
pot_header = self.pot_header() pot_header = self.pot_header()
with tempfile.NamedTemporaryFile() as fl: with tempfile.NamedTemporaryFile() as fl:
fl.write('\n'.join(files)) fl.write('\n'.join(files).encode('utf-8'))
fl.flush() fl.flush()
out = tempfile.NamedTemporaryFile(suffix='.pot', delete=False) out = tempfile.NamedTemporaryFile(suffix='.pot', delete=False)
out.close() out.close()