Skip to content

Commit

Permalink
Merge pull request #2853 from bonicim/hotfix/8.1.3
Browse files Browse the repository at this point in the history
Fix Ambient tests and load_config
  • Loading branch information
craig8 authored Jan 12, 2022
2 parents 2f1c89d + d322baa commit 5be3926
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions services/core/Ambient/tests/test_ambient_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
"test_ambient_data.json"
" variable app_key")

pytestmark = [pytestmark_api, pytestmark_app, pytestmark_locs]

@pytest.fixture(scope="module")
def query_agent(request, volttron_instance):
Expand Down
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 5be3926

Please sign in to comment.