Use dict_deep

This commit is contained in:
2021-05-09 16:17:56 +02:00
parent 7b1943fb86
commit fcf65b7c10
3 changed files with 10 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import yaml
from dict_deep import deep_get
conf = None
@@ -8,3 +9,7 @@ def read_config(filename):
global conf
conf = yaml.safe_load(f)
return conf
def get_value(key: str):
return deep_get(conf, key)