nitrokey.nk3.updates¶
- class nitrokey.nk3.updates.UpdateUi¶
Baser:
ABC
- abstract abort(*msgs)¶
- Parametre:
msgs (Any)
- Returtype:
Exception
- abstract abort_downgrade(current, image)¶
- abstract abort_pynitrokey_version(current, required)¶
- abstract confirm_download(current, new)¶
- abstract confirm_extra_information(extra_info)¶
- Parametre:
extra_info (List[str])
- Returtype:
None
- abstract confirm_pynitrokey_version(current, required)¶
- abstract confirm_update(current, new)¶
- abstract download_progress_bar(desc)¶
- Parametre:
desc (str)
- Returtype:
Iterator[Callable[[int, int], None]]
- abstract error(*msgs)¶
- Parametre:
msgs (Any)
- Returtype:
Exception
- abstract finalization_progress_bar()¶
- Returtype:
Iterator[Callable[[int, int], None]]
- abstract pre_bootloader_hint()¶
- Returtype:
None
- abstract request_bootloader_confirmation()¶
- Returtype:
None
- abstract update_progress_bar()¶
- Returtype:
Iterator[Callable[[int, int], None]]
- class nitrokey.nk3.updates.Updater¶
Baser:
object
- __init__(ui, await_bootloader, await_device, ignore_warnings=frozenset({}))¶
- Parametre:
ui (UpdateUi)
await_bootloader (Callable[[], NK3Bootloader])
await_device (Callable[[int | None, Callable[[int, int], None] | None], NK3])
ignore_warnings (Set[Warning])
- Returtype:
None
- update(device, image, update_version, ignore_pynitrokey_version=False)¶
- Parametre:
device (TrussedBase)
image (str | None)
update_version (str | None)
ignore_pynitrokey_version (bool)
- Returtype:
- class nitrokey.nk3.updates.Warning¶
Baser:
Enum
En advarsel, der kan opstå under en firmwareopdatering.
Som standard afbryder disse advarsler firmwareopdateringen. Denne enum kan bruges til at vælge typer af advarsler, der skal ignoreres og ikke få firmwareopdateringen til at mislykkes.
- IFS_MIGRATION_V2 = 'ifs-migration-v2'¶
- MISSING_STATUS = 'missing-status'¶
- SDK_VERSION = 'sdk-version'¶
- UPDATE_FROM_BOOTLOADER = 'update-from-bootloader'¶
- property message: str¶