Skip to content

Commit

Permalink
Parse environment variables with yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbyt3r committed Apr 16, 2024
1 parent 4a87730 commit 756429f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sideboard/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import unicode_literals
import pathlib
import json
import yaml
import os

from os import unlink
Expand Down Expand Up @@ -123,7 +124,7 @@ def load_section_from_environment(path, section):
else:
name = normalize_name(f"{path}_{setting}")
if name in os.environ:
config[setting] = os.environ.get(normalize_name(name))
config[setting] = yaml.safe_load(os.environ.get(normalize_name(name)))
return config

def parse_config(requesting_file_path, is_plugin=True):
Expand Down

0 comments on commit 756429f

Please sign in to comment.