Skip to content

Commit

Permalink
[resotolib][fix] Initialize empty config to {} (#1327)
Browse files Browse the repository at this point in the history
  • Loading branch information
lloesche authored Dec 1, 2022
1 parent 46dde38 commit 6e8de0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resotolib/resotolib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ def load_config(self, reload: bool = False) -> None:
def read_config(config: Json) -> Dict[str, Any]:
new_config = {}
for config_id, config_data in config.items():
if config_data is None:
config_data = {}
if config_id in Config.running_config.classes:
log.debug(f"Loading config section {config_id}")
clazz: Type[Any] = Config.running_config.classes.get(config_id, Any)
Expand Down

0 comments on commit 6e8de0c

Please sign in to comment.