summary refs log tree commit diff
path: root/synapse/config/_base.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-09-09 17:52:05 +0100
committerGitHub <noreply@github.com>2019-09-09 17:52:05 +0100
commit43c1a10e91137a967474be8551ef6ae75a79285f (patch)
treed20b97cea7cce0d8df3df6368b6bf952905d8fdb /synapse/config/_base.py
parentMerge pull request #1 from matrix-org/babolivier/direct-avatar-name (diff)
parentRename io.open import to limite side-effects (diff)
downloadsynapse-43c1a10e91137a967474be8551ef6ae75a79285f.tar.xz
Merge pull request #3 from matrix-org/babolivier/password-reset-template-unicode
Ensure the password reset template is correctly converted to binary
Diffstat (limited to 'synapse/config/_base.py')
-rw-r--r--synapse/config/_base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/config/_base.py b/synapse/config/_base.py

index f7d7f153bb..bf039e5823 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py
@@ -16,6 +16,7 @@ import argparse import errno import os +from io import open as io_open from textwrap import dedent from six import integer_types @@ -131,7 +132,7 @@ class Config(object): @classmethod def read_file(cls, file_path, config_name): cls.check_file(file_path, config_name) - with open(file_path) as file_stream: + with io_open(file_path, encoding="utf-8") as file_stream: return file_stream.read() @staticmethod