Restore compatibility for key hierarchy

This commit is contained in:
thePR0M3TH3AN
2025-08-20 18:12:02 -04:00
parent bbb26ca55a
commit b97d60778b
5 changed files with 65 additions and 23 deletions

View File

@@ -1415,9 +1415,10 @@ def main(argv: list[str] | None = None, *, fingerprint: str | None = None) -> in
if entry.get("type") != EntryType.TOTP.value:
print(colored("Entry is not a TOTP entry.", "red"))
return 1
code = password_manager.entry_manager.get_totp_code(
idx, password_manager.KEY_TOTP_DET
key = getattr(password_manager, "KEY_TOTP_DET", None) or getattr(
password_manager, "parent_seed", None
)
code = password_manager.entry_manager.get_totp_code(idx, key)
print(code)
try:
if copy_to_clipboard(code, password_manager.clipboard_clear_delay):