2021-10-07 10:26:43 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
import yaml
|
|
|
|
|
|
|
|
|
|
|
|
def load_config(filename: str):
|
|
|
|
with open(filename, 'r', encoding='utf-8') as cfg_file:
|
|
|
|
return yaml.safe_load(cfg_file)
|
|
|
|
|
|
|
|
|
|
|
|
def config_location() -> str:
|
2021-10-07 11:31:12 +00:00
|
|
|
return os.getenv('WEBPUB1C_CONFIG', 'config.yml')
|