Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Allow YAML config file to contain None #7779

Merged
merged 5 commits into from
Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/7779.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow YAML config file to contain None. Useful when config file is fully commented.
kotovalexarian marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion synctl
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down