Enhancements
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import yaml
|
||||
import os
|
||||
|
||||
def load_config(config_path="./sustApp/config.yaml"):
|
||||
def load_config(config_path=None):
|
||||
if config_path is None:
|
||||
# Resolve path relative to this module's location
|
||||
config_path = os.path.join(os.path.dirname(__file__), "config.yaml")
|
||||
with open(config_path, encoding='utf8') as f:
|
||||
return yaml.load(f, Loader=yaml.FullLoader)
|
||||
Reference in New Issue
Block a user