passwords#get_values
This commit is contained in:
parent
3c3be6d79c
commit
e14180cbe7
1 changed files with 9 additions and 1 deletions
|
|
@ -30,7 +30,15 @@ class Passwords:
|
||||||
return Passwords._open_or_create(lock_path, password)
|
return Passwords._open_or_create(lock_path, password)
|
||||||
|
|
||||||
def get_values(self, keys: list[str]) -> dict[str, str]:
|
def get_values(self, keys: list[str]) -> dict[str, str]:
|
||||||
return {}
|
output = {}
|
||||||
|
for k in keys:
|
||||||
|
key_parts = k.split(".")
|
||||||
|
path = key_parts[:-2] if len(key_parts) > 2 else None
|
||||||
|
entry_name = key_parts[-2]
|
||||||
|
field_name = key_parts[-1]
|
||||||
|
kp_entry = self._kp_org.find_entries(path=path, first=True, name=entry_name)[0]
|
||||||
|
output[k] = kp_entry[field_name]
|
||||||
|
return output
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
# nadpisz plik źródłowy zmianami z lock
|
# nadpisz plik źródłowy zmianami z lock
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue