diff --git a/st2common/st2common/util/config_loader.py b/st2common/st2common/util/config_loader.py index cff48a03c8..e958bc755d 100644 --- a/st2common/st2common/util/config_loader.py +++ b/st2common/st2common/util/config_loader.py @@ -135,7 +135,11 @@ def _assign_dynamic_config_values(self, schema, config, parent_keys=None): for config_item_key, config_item_value in iterator: if config_is_dict: # different schema for each key/value pair - schema_item = schema.get(config_item_key, {}) + try: + # do not use schema.get() as schema might be a defaultdict + schema_item = schema[config_item_key] + except KeyError: + schema_item = {} if config_is_list: # same schema is shared between every item in the list schema_item = schema