actesweb: make file encoding compliant with ActesWeb (#30033)

This commit is contained in:
Serghei Mihai 2019-01-23 15:43:01 +01:00
parent a57cb9e615
commit 38149ceacb
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ def named_tempfile(*args, **kwargs):
with tempfile.NamedTemporaryFile(*args, **kwargs) as fp:
if six.PY2:
import codecs
fp = codecs.getwriter('utf-8')(fp)
fp = codecs.getwriter('iso-8859-15')(fp)
yield fp

View File

@ -80,7 +80,7 @@ def assert_file_content_values(filename, expectations):
with io.open(filename, 'rb') as fp:
for line in fp.readlines():
if six.PY2:
field, value = line.decode('utf-8').split('=')
field, value = line.decode('iso-8859-15').split('=')
else:
field, value = line.split('=')
if field in expectations: