mirror of
https://github.com/scito/extract_otp_secrets.git
synced 2025-12-12 09:49:46 +01:00
fix #106: avoid UnboundLocalError for count_Xotp_entries: check has_Xotp
This commit is contained in:
@@ -735,8 +735,8 @@ def write_keepass_csv(file: str, otps: Otps) -> None:
|
|||||||
if has_hotp:
|
if has_hotp:
|
||||||
count_hotp_entries = write_keepass_htop_csv(otp_filename_hotp, otps)
|
count_hotp_entries = write_keepass_htop_csv(otp_filename_hotp, otps)
|
||||||
if not quiet:
|
if not quiet:
|
||||||
if count_totp_entries: print(f"Exported {count_totp_entries} totp entrie{'s'[:count_totp_entries != 1]} to keepass csv file {otp_filename_totp}")
|
if has_totp and count_totp_entries: print(f"Exported {count_totp_entries} totp entrie{'s'[:count_totp_entries != 1]} to keepass csv file {otp_filename_totp}")
|
||||||
if count_hotp_entries: print(f"Exported {count_hotp_entries} hotp entrie{'s'[:count_hotp_entries != 1]} to keepass csv file {otp_filename_hotp}")
|
if has_hotp and count_hotp_entries: print(f"Exported {count_hotp_entries} hotp entrie{'s'[:count_hotp_entries != 1]} to keepass csv file {otp_filename_hotp}")
|
||||||
|
|
||||||
|
|
||||||
def write_keepass_totp_csv(file: str, otps: Otps) -> int:
|
def write_keepass_totp_csv(file: str, otps: Otps) -> int:
|
||||||
|
|||||||
Reference in New Issue
Block a user