Skip to content

Commit 2fc6f25

Browse files
update: return tuple including status
1 parent 4206bee commit 2fc6f25

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/nitrokey/nk3/updates.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from contextlib import contextmanager
1616
from importlib.metadata import PackageNotFoundError
1717
from io import BytesIO
18-
from typing import TYPE_CHECKING, Any, Callable, Iterator, List, Optional, Union
18+
from typing import TYPE_CHECKING, Any, Callable, Iterator, List, Optional, Tuple, Union
1919

2020
from nitrokey._helpers import Retries
2121
from nitrokey.nk3 import NK3, NK3Bootloader
@@ -266,7 +266,7 @@ def update(
266266
image: Optional[str],
267267
update_version: Optional[str],
268268
ignore_pynitrokey_version: bool = False,
269-
) -> Version:
269+
) -> Tuple[Version, Status]:
270270
update_from_bootloader = False
271271
current_version = None
272272
status = None
@@ -332,8 +332,9 @@ def update(
332332
f"The firmware update to {container.version} was successful, but the "
333333
f"firmware is still reporting version {version}."
334334
)
335+
status = device.admin.status()
335336

336-
return container.version
337+
return container.version, status
337338

338339
def _prepare_update(
339340
self,

0 commit comments

Comments
 (0)