mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-01-12 07:39:43 -05:00
Allow YAML config file to contain None (#7779)
Useful when config file is fully commented Signed-off-by: Alex Kotov <kotovalexarian@gmail.com>
This commit is contained in:
parent
f3e0f16240
commit
8097659f6e
1
changelog.d/7779.bugfix
Normal file
1
changelog.d/7779.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix synctl to handle empty config files correctly. Contributed by @kotovalexarian.
|
1
synctl
1
synctl
@ -239,6 +239,7 @@ def main():
|
|||||||
for config_file in config_files:
|
for config_file in config_files:
|
||||||
with open(config_file) as file_stream:
|
with open(config_file) as file_stream:
|
||||||
yaml_config = yaml.safe_load(file_stream)
|
yaml_config = yaml.safe_load(file_stream)
|
||||||
|
if yaml_config is not None:
|
||||||
config.update(yaml_config)
|
config.update(yaml_config)
|
||||||
|
|
||||||
pidfile = config["pid_file"]
|
pidfile = config["pid_file"]
|
||||||
|
Loading…
Reference in New Issue
Block a user