Merge "write_config: force utf8"

This commit is contained in:
Zuul 2018-10-22 20:49:04 +00:00 committed by Gerrit Code Review
commit 7ff0d42c00
1 changed files with 2 additions and 2 deletions

View File

@ -430,12 +430,12 @@ class Config(object):
"config-download." % d['deployment_name'])
warnings.warn(message, DeprecationWarning)
with open(deployment_path, 'w') as f:
with open(deployment_path, 'wb') as f:
template_data = deployment_template.render(
deployment=d,
server_id=server_ids[server])
self.validate_config(template_data, deployment_path)
f.write(template_data)
f.write(template_data.encode('utf-8'))
for role, deployments in role_deployment_names.items():
group_var_role_path = os.path.join(group_vars_dir, role)