From 8097659f6e5740ed2dcaedca2a10bdda29dd6ace Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Fri, 3 Jul 2020 17:19:03 +0500 Subject: Allow YAML config file to contain None (#7779) Useful when config file is fully commented Signed-off-by: Alex Kotov --- synctl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'synctl') diff --git a/synctl b/synctl index ca398b84bd..9395ebd048 100755 --- a/synctl +++ b/synctl @@ -239,7 +239,8 @@ def main(): for config_file in config_files: with open(config_file) as file_stream: yaml_config = yaml.safe_load(file_stream) - config.update(yaml_config) + if yaml_config is not None: + config.update(yaml_config) pidfile = config["pid_file"] cache_factor = config.get("synctl_cache_factor") -- cgit 1.5.1