From c8f03a8fb0160956c5c593f63641e9a522ee2b8e Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Mon, 9 Sep 2019 17:13:37 +0100 Subject: Rename io.open import to limite side-effects --- synapse/config/_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 71a81c1cc9..bf039e5823 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -16,7 +16,7 @@ import argparse import errno import os -from io import open +from io import open as io_open from textwrap import dedent from six import integer_types @@ -132,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, encoding="utf-8") as file_stream: + with io_open(file_path, encoding="utf-8") as file_stream: return file_stream.read() @staticmethod -- cgit 1.5.1