nitrokey.nk3.updates¶
- class nitrokey.nk3.updates.UpdateUi¶
Basisklassen:
ABC
- abstract abort(*msgs)¶
- Parameters:
msgs (Any)
- Return type:
Exception
- abstract abort_downgrade(current, image)¶
- abstract abort_pynitrokey_version(current, required)¶
- abstract confirm_download(current, new)¶
- abstract confirm_extra_information(extra_info)¶
- Parameters:
extra_info (List[str])
- Return type:
None
- abstract confirm_pynitrokey_version(current, required)¶
- abstract confirm_update(current, new)¶
- abstract download_progress_bar(desc)¶
- Parameters:
desc (str)
- Return type:
Iterator[Callable[[int, int], None]]
- abstract error(*msgs)¶
- Parameters:
msgs (Any)
- Return type:
Exception
- abstract finalization_progress_bar()¶
- Return type:
Iterator[Callable[[int, int], None]]
- abstract pre_bootloader_hint()¶
- Return type:
None
- abstract request_bootloader_confirmation()¶
- Return type:
None
- abstract update_progress_bar()¶
- Return type:
Iterator[Callable[[int, int], None]]
- class nitrokey.nk3.updates.Updater¶
Basisklassen:
object
- __init__(ui, await_bootloader, await_device, ignore_warnings=frozenset({}))¶
- Parameters:
ui (UpdateUi)
await_bootloader (Callable[[], NK3Bootloader])
await_device (Callable[[int | None, Callable[[int, int], None] | None], NK3])
ignore_warnings (Set[Warning])
- Return type:
None
- update(device, image, update_version, ignore_pynitrokey_version=False)¶
- Parameters:
device (TrussedBase)
image (str | None)
update_version (str | None)
ignore_pynitrokey_version (bool)
- Return type:
- class nitrokey.nk3.updates.Warning¶
Basisklassen:
Enum
Een waarschuwing die kan optreden tijdens een firmware-update.
Standaard wordt de firmware-update afgebroken door deze waarschuwingen. Dit enum kan gebruikt worden om soorten waarschuwingen te selecteren die genegeerd moeten worden en er niet voor zorgen dat de firmware-update mislukt.
- IFS_MIGRATION_V2 = 'ifs-migration-v2'¶
- MISSING_STATUS = 'missing-status'¶
- SDK_VERSION = 'sdk-version'¶
- UPDATE_FROM_BOOTLOADER = 'update-from-bootloader'¶
- property message: str¶