Use dict_deep
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user