Skip to content

Commit

Permalink
Merge pull request #2840 from bonicim/bugfix/load_config
Browse files Browse the repository at this point in the history
Fix bug in load_config
  • Loading branch information
craig8 authored and bonicim committed Jan 12, 2022
1 parent 6252865 commit bac5447
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion volttron/platform/agent/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ def load_config(config_path):
# Then if that fails we fallback to our modified json parser.
try:
with open(config_path) as f:
return yaml.safe_load(f.read())
config = yaml.safe_load(f.read())
if config is None:
return {}
return config
except yaml.scanner.ScannerError as e:
try:
with open(config_path) as f:
Expand Down

0 comments on commit bac5447

Please sign in to comment.