From bac5447df148a8013950dd6877d77df84b5eba7c Mon Sep 17 00:00:00 2001 From: Craig <3979063+craig8@users.noreply.github.com> Date: Wed, 15 Dec 2021 09:02:52 -0800 Subject: [PATCH] Merge pull request #2840 from bonicim/bugfix/load_config Fix bug in load_config --- volttron/platform/agent/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/volttron/platform/agent/utils.py b/volttron/platform/agent/utils.py index 285722a486..1cff227b9b 100644 --- a/volttron/platform/agent/utils.py +++ b/volttron/platform/agent/utils.py @@ -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: