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()
@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)