Skip to content

Commit 5be3926

Browse files
authored
Merge pull request #2853 from bonicim/hotfix/8.1.3
Fix Ambient tests and load_config
2 parents 2f1c89d + d322baa commit 5be3926

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

services/core/Ambient/tests/test_ambient_agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
"test_ambient_data.json"
125125
" variable app_key")
126126

127+
pytestmark = [pytestmark_api, pytestmark_app, pytestmark_locs]
127128

128129
@pytest.fixture(scope="module")
129130
def query_agent(request, volttron_instance):

volttron/platform/agent/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ def load_config(config_path):
156156
# Then if that fails we fallback to our modified json parser.
157157
try:
158158
with open(config_path) as f:
159-
return yaml.safe_load(f.read())
159+
config = yaml.safe_load(f.read())
160+
if config is None:
161+
return {}
162+
return config
160163
except yaml.scanner.ScannerError as e:
161164
try:
162165
with open(config_path) as f:

0 commit comments

Comments
 (0)