Skip to content

Commit

Permalink
Bug fix when "stores" is not present in YAML config
Browse files Browse the repository at this point in the history
Resolves error when "stores" is returned as None, rather than an empty dictionary in the event no "stores" are present in the YAML configuration
  • Loading branch information
nick-enoent authored and tom95858 committed Jan 15, 2025
1 parent 62821d1 commit d5ca1a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ldms/python/ldmsd/parser_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,9 @@ def build_stores(self, config):
Return a dictionary keyed by the group name. Each dictionary
entry is a list of stores in that group.
"""
if 'stores' not in config:
return None
stores = {}
if 'stores' not in config:
return stores
if type(config['stores']) is not dict:
raise ValueError(f'{LDMS_YAML_ERR}\n'
f'store {DICT_ERR}\n'
Expand Down

0 comments on commit d5ca1a5

Please sign in to comment.