Skip to content

Commit

Permalink
try to see if moving yaml is still necessary.
Browse files Browse the repository at this point in the history
  • Loading branch information
JPBergsma committed Oct 3, 2023
1 parent 8ae4081 commit 68f14d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions optimade/server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def config_file_settings(settings: BaseSettings) -> Dict[str, Any]:
import json
import os

import yaml

encoding = settings.__config__.env_file_encoding
config_file = Path(os.getenv("OPTIMADE_CONFIG_FILE", DEFAULT_CONFIG_FILE_PATH))

Expand All @@ -98,8 +100,6 @@ def config_file_settings(settings: BaseSettings) -> Dict[str, Any]:
res = json.loads(config_file_content)
except json.JSONDecodeError as json_exc:
try:
import yaml

# This can essentially also load JSON files, as JSON is a subset of YAML v1,
# but I suspect it is not as rigorous
res = yaml.safe_load(config_file_content)
Expand Down

0 comments on commit 68f14d3

Please sign in to comment.