Skip to content

Commit

Permalink
factory-reset(-app): remove --experimental flag
Browse files Browse the repository at this point in the history
I added the same warning as in `update`, but it appears it is just a string without any
User-visible behaviour. Should this be changed to local_print?
  • Loading branch information
sosthene-nitrokey committed Apr 15, 2024
1 parent 600527e commit af6ca09
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pynitrokey/cli/nk3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from pynitrokey.cli import trussed
from pynitrokey.cli.exceptions import CliException
from pynitrokey.cli.trussed.test import TestCase
from pynitrokey.helpers import check_experimental_flag
from pynitrokey.nk3 import NK3_DATA
from pynitrokey.nk3.bootloader import Nitrokey3Bootloader
from pynitrokey.nk3.device import Nitrokey3Device
Expand Down Expand Up @@ -243,7 +242,10 @@ def set_config(ctx: Context, key: str, value: str, force: bool, dry_run: bool) -
)
def factory_reset(ctx: Context, experimental: bool) -> None:
"""Factory reset all functionality of the device"""
check_experimental_flag(experimental)

if experimental:
"The --experimental switch is not required to run this command anymore and can be safely removed."

with ctx.connect_device() as device:
device.admin.factory_reset()

Expand All @@ -264,7 +266,10 @@ def factory_reset(ctx: Context, experimental: bool) -> None:
)
def factory_reset_app(ctx: Context, application: str, experimental: bool) -> None:
"""Factory reset all functionality of an application"""
check_experimental_flag(experimental)

if experimental:
"The --experimental switch is not required to run this command anymore and can be safely removed."

with ctx.connect_device() as device:
device.admin.factory_reset_app(application)

Expand Down

0 comments on commit af6ca09

Please sign in to comment.