From 890f8c8ecfdb90948d6a9eefb353387ac9b69f61 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Fri, 3 Jul 2020 14:57:32 +0500 Subject: [PATCH 1/5] Allow YAML config file to contain None Useful when config file is fully commented Signed-off-by: Alex Kotov --- synctl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synctl b/synctl index ca398b84bd1c..9395ebd0485e 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") From 0c2790d1e1222a3f28c300dbccacda1e2ba82e6a Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Fri, 3 Jul 2020 15:12:50 +0500 Subject: [PATCH 2/5] Add changelog Signed-off-by: Alex Kotov --- changelog.d/7779.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/7779.bugfix diff --git a/changelog.d/7779.bugfix b/changelog.d/7779.bugfix new file mode 100644 index 000000000000..3863635656c8 --- /dev/null +++ b/changelog.d/7779.bugfix @@ -0,0 +1 @@ +Allow YAML config file to contain None. Useful when config file is fully commented. From f7a7f81731883bf4a01290fba5cb543a338308be Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Fri, 3 Jul 2020 15:55:18 +0500 Subject: [PATCH 3/5] Update 7779.bugfix Signed-off-by: Alex Kotov --- changelog.d/7779.bugfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/7779.bugfix b/changelog.d/7779.bugfix index 3863635656c8..cee53371b638 100644 --- a/changelog.d/7779.bugfix +++ b/changelog.d/7779.bugfix @@ -1 +1 @@ -Allow YAML config file to contain None. Useful when config file is fully commented. +Allow **synctl** config files to contain `None`. Useful when some config files are fully commented. From 82696b7dee0190af118e4596061054370a56a57b Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Fri, 3 Jul 2020 13:17:52 +0100 Subject: [PATCH 4/5] Update changelog.d/7779.bugfix --- changelog.d/7779.bugfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/7779.bugfix b/changelog.d/7779.bugfix index cee53371b638..69421f4f1be3 100644 --- a/changelog.d/7779.bugfix +++ b/changelog.d/7779.bugfix @@ -1 +1 @@ -Allow **synctl** config files to contain `None`. Useful when some config files are fully commented. +Fix synctl to handle empty config files correctly. From 4b9650c5c32fbf3d740650ad8deb3320354526da Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Fri, 3 Jul 2020 13:18:20 +0100 Subject: [PATCH 5/5] Update 7779.bugfix --- changelog.d/7779.bugfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/7779.bugfix b/changelog.d/7779.bugfix index 69421f4f1be3..61de45d570ae 100644 --- a/changelog.d/7779.bugfix +++ b/changelog.d/7779.bugfix @@ -1 +1 @@ -Fix synctl to handle empty config files correctly. +Fix synctl to handle empty config files correctly. Contributed by @kotovalexarian.