fix: Revert config location
This commit is contained in:
parent
597107d2b5
commit
3367ad2094
1 changed files with 3 additions and 3 deletions
|
|
@ -37,15 +37,15 @@ class Settings(BaseSettings):
|
|||
kp: KeePassConfig = KeePassConfig()
|
||||
|
||||
@classmethod
|
||||
def from_yaml(cls, path: Path | str = "../../config/config.yaml") -> "Settings":
|
||||
def from_yaml(cls, path: Path | str = "config/config.yaml") -> "Settings":
|
||||
p = Path(path)
|
||||
data = {}
|
||||
if p.exists():
|
||||
with p.open("r", encoding="utf-8") as fh:
|
||||
data = yaml.safe_load(fh) or {}
|
||||
else:
|
||||
import sys
|
||||
sys.stderr.write(f"Warning: Config file {p.absolute()} not found.\n")
|
||||
import sys, os
|
||||
sys.stderr.write(f"Warning: Config file {os.path.realpath(p)} not found.\n")
|
||||
return cls(**data)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue