From d2443f4ebe511bdfda4502bc25b79b2d9da4feb7 Mon Sep 17 00:00:00 2001 From: Julen Ruiz Aizpuru Date: Tue, 21 Jan 2020 18:01:02 +0100 Subject: [PATCH] py3: fix file io in runner --- pootle/runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pootle/runner.py b/pootle/runner.py index e8b935eb7a..583dea75c9 100644 --- a/pootle/runner.py +++ b/pootle/runner.py @@ -86,10 +86,10 @@ def init_settings(settings_filepath, template_filename, "db_port": db_port, } - with open(settings_filepath, 'w') as settings: + with open(settings_filepath, 'w', encoding='utf-8') as settings: with open(template_filename) as template: settings.write( - (template.read().decode("utf8") % context).encode("utf8")) + (template.read() % context)) def init_command(parser, settings_template, args):