diff options
author | Erik Johnston <erikj@jki.re> | 2019-03-22 11:58:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-22 11:58:13 +0000 |
commit | 5fee9d8067b0078d13ec99b08f1a2ff471478f38 (patch) | |
tree | 1d2778edecc564dd5cfad09adb03cd236d6de4e3 /synapse/config/_base.py | |
parent | Allow newsfragments to end with exclamation marks! (#4912) (diff) | |
parent | Newsfile (diff) | |
download | synapse-5fee9d8067b0078d13ec99b08f1a2ff471478f38.tar.xz |
Merge pull request #4869 from matrix-org/erikj/yaml_load
Fix yaml warnings by using safe_load
Diffstat (limited to 'synapse/config/_base.py')
-rw-r--r-- | synapse/config/_base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/config/_base.py b/synapse/config/_base.py index a219a83550..f7d7f153bb 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -137,7 +137,7 @@ class Config(object): @staticmethod def read_config_file(file_path): with open(file_path) as file_stream: - return yaml.load(file_stream) + return yaml.safe_load(file_stream) def invoke_all(self, name, *args, **kargs): results = [] @@ -318,7 +318,7 @@ class Config(object): ) config_file.write(config_str) - config = yaml.load(config_str) + config = yaml.safe_load(config_str) obj.invoke_all("generate_files", config) print( @@ -390,7 +390,7 @@ class Config(object): server_name=server_name, generate_secrets=False, ) - config = yaml.load(config_string) + config = yaml.safe_load(config_string) config.pop("log_config") config.update(specified_config) |