1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

trezorctl: add no-backup option to reset-device

This commit is contained in:
Pavol Rusnak 2018-10-08 14:17:07 +02:00
parent d49a38d80f
commit c395501d2d
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 5 additions and 0 deletions

View File

@ -440,6 +440,7 @@ def recovery_device(
@click.option("-l", "--label") @click.option("-l", "--label")
@click.option("-u", "--u2f-counter", default=0) @click.option("-u", "--u2f-counter", default=0)
@click.option("-s", "--skip-backup", is_flag=True) @click.option("-s", "--skip-backup", is_flag=True)
@click.option("-n", "--no-backup", is_flag=True)
@click.pass_obj @click.pass_obj
def reset_device( def reset_device(
connect, connect,
@ -450,6 +451,7 @@ def reset_device(
label, label,
u2f_counter, u2f_counter,
skip_backup, skip_backup,
no_backup,
): ):
return device.reset( return device.reset(
connect(), connect(),
@ -461,6 +463,7 @@ def reset_device(
"english", "english",
u2f_counter, u2f_counter,
skip_backup, skip_backup,
no_backup,
) )

View File

@ -154,6 +154,7 @@ def reset(
language, language,
u2f_counter=0, u2f_counter=0,
skip_backup=False, skip_backup=False,
no_backup=False,
): ):
if client.features.initialized: if client.features.initialized:
raise RuntimeError( raise RuntimeError(
@ -170,6 +171,7 @@ def reset(
label=label, label=label,
u2f_counter=u2f_counter, u2f_counter=u2f_counter,
skip_backup=bool(skip_backup), skip_backup=bool(skip_backup),
no_backup=bool(no_backup),
) )
resp = client.call(msg) resp = client.call(msg)