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:
parent
d49a38d80f
commit
c395501d2d
@ -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,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user