test: password file read fix?

This commit is contained in:
Piotr Dec 2026-07-12 23:57:07 +02:00
parent 612afbc7e0
commit 01d6f1f049
Signed by: stawros
GPG key ID: 74B18A3F0F1E99C0

View file

@ -47,7 +47,7 @@ class Passwords:
logger.info(f"Reading secret file at {settings.kp.secret}")
with open(settings.kp.secret, "r") as fh:
keyring.set_password("karl", "kp", fh.read().splitlines()[0])
keyring.set_password("karl", "kp", fh.read().splitlines()[0].replace('\r', '').strip())
logger.info(f"Database file: {settings.kp.file}")
self._path = settings.kp.file
if not os.path.exists(self._path):