mirror of
https://github.com/nikdoof/decrypt-otpauth-files.git
synced 2025-12-17 02:59:31 +00:00
style: use click.echo instead of print, f-strings instead of implicit concatenation
This commit is contained in:
@@ -205,7 +205,7 @@ def decrypt_account(encrypted_otpauth_account):
|
|||||||
elif archive['Version'] == 1.2:
|
elif archive['Version'] == 1.2:
|
||||||
account = decrypt_account_12(archive, password)
|
account = decrypt_account_12(archive, password)
|
||||||
else:
|
else:
|
||||||
print('Encountered unknow file version', archive['Version'])
|
click.echo(f'Encountered unknow file version: {archive["Version"]}')
|
||||||
return
|
return
|
||||||
|
|
||||||
render_qr_to_terminal(account.otp_uri(), account.type, account.issuer, account.label)
|
render_qr_to_terminal(account.otp_uri(), account.type, account.issuer, account.label)
|
||||||
@@ -264,7 +264,7 @@ def decrypt_backup(encrypted_otpauth_backup):
|
|||||||
elif archive['Version'] == 1.1:
|
elif archive['Version'] == 1.1:
|
||||||
accounts = decrypt_backup_11(archive, password)
|
accounts = decrypt_backup_11(archive, password)
|
||||||
else:
|
else:
|
||||||
print('Encountered unknow file version', archive['Version'])
|
click.echo(f'Encountered unknow file version: {archive["Version"]}')
|
||||||
return
|
return
|
||||||
|
|
||||||
for account in accounts:
|
for account in accounts:
|
||||||
|
|||||||
Reference in New Issue
Block a user