in otava/config.py [0:0]
def load_config() -> Config:
"""Loads config from one of the default locations"""
env_config_path = os.environ.get("OTAVA_CONFIG")
if env_config_path:
return load_config_from(Path(env_config_path).absolute())
paths = [
Path().home() / ".otava/otava.yaml",
Path().home() / ".otava/conf.yaml",
Path(os.path.realpath(__file__)).parent / "resources/otava.yaml",
]
for p in paths:
if p.exists():
return load_config_from(p)
raise ConfigError(f"No configuration file found. Checked $OTAVA_CONFIG and searched: {paths}")