fix: Revert config location

This commit is contained in:
Piotr Dec 2025-12-04 00:22:38 +01:00
parent 597107d2b5
commit 3367ad2094
Signed by: stawros
GPG key ID: 74B18A3F0F1E99C0

View file

@ -37,15 +37,15 @@ class Settings(BaseSettings):
kp: KeePassConfig = KeePassConfig() kp: KeePassConfig = KeePassConfig()
@classmethod @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) p = Path(path)
data = {} data = {}
if p.exists(): if p.exists():
with p.open("r", encoding="utf-8") as fh: with p.open("r", encoding="utf-8") as fh:
data = yaml.safe_load(fh) or {} data = yaml.safe_load(fh) or {}
else: else:
import sys import sys, os
sys.stderr.write(f"Warning: Config file {p.absolute()} not found.\n") sys.stderr.write(f"Warning: Config file {os.path.realpath(p)} not found.\n")
return cls(**data) return cls(**data)