chore: more verbosity in passwords
This commit is contained in:
parent
910735def7
commit
e904f3a05b
1 changed files with 4 additions and 0 deletions
|
|
@ -45,9 +45,13 @@ class Passwords:
|
|||
import keyring_backend
|
||||
keyring.set_keyring(keyring=keyring_backend.Backend())
|
||||
|
||||
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])
|
||||
logger.info(f"Database file: {settings.kp.file}")
|
||||
self._path = settings.kp.file
|
||||
if not os.path.exists(self._path):
|
||||
logger.warning(f"Database file {self._path} does not exist")
|
||||
|
||||
@contextmanager
|
||||
def open(self, mode: str = "r") -> Generator[PyKeePass | Any, Any, None]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue