Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Nov 16, 2023
1 parent 92e6a3a commit 3715987
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions pynitrokey/cli/nk3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ def factory_reset(ctx: Context) -> None:
with ctx.connect_device() as device:
device.factory_reset()


@nk3.command()
@click.pass_obj
@click.argument("application", type=click.STRING, required=True)
Expand Down
7 changes: 6 additions & 1 deletion pynitrokey/nk3/admin_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,12 @@ def factory_reset(self) -> None:
else:
raise e
FactoryResetStatus.check(reply[0], "Failed to factory reset the device")

def factory_reset_app(self, application) -> None:
reply = self._call(AdminCommand.FACTORY_RESET_APP, data=application.encode("ascii"), response_len=1)
reply = self._call(
AdminCommand.FACTORY_RESET_APP,
data=application.encode("ascii"),
response_len=1,
)
assert reply
FactoryResetStatus.check(reply[0], "Failed to factory reset the device")

0 comments on commit 3715987

Please sign in to comment.