nitrokey.nk3.updates

class nitrokey.nk3.updates.UpdateUi

ベースクラス: ABC

abstract abort(*msgs)
パラメータ:

msgs (Any)

戻り値の型:

Exception

abstract abort_downgrade(current, image)
パラメータ:
戻り値の型:

Exception

abstract abort_pynitrokey_version(current, required)
パラメータ:
戻り値の型:

Exception

abstract confirm_download(current, new)
パラメータ:
戻り値の型:

None

abstract confirm_extra_information(extra_info)
パラメータ:

extra_info (List[str])

戻り値の型:

None

abstract confirm_pynitrokey_version(current, required)
パラメータ:
戻り値の型:

None

abstract confirm_update(current, new)
パラメータ:
戻り値の型:

None

abstract confirm_update_same_version(version)
パラメータ:

version (Version)

戻り値の型:

None

abstract download_progress_bar(desc)
パラメータ:

desc (str)

戻り値の型:

Iterator[Callable[[int, int], None]]

abstract error(*msgs)
パラメータ:

msgs (Any)

戻り値の型:

Exception

abstract finalization_progress_bar()
戻り値の型:

Iterator[Callable[[int, int], None]]

abstract pre_bootloader_hint()
戻り値の型:

None

abstract raise_warning(warning)
パラメータ:

warning (Warning)

戻り値の型:

Exception

abstract request_bootloader_confirmation()
戻り値の型:

None

abstract show_warning(warning)
パラメータ:

warning (Warning)

戻り値の型:

None

abstract update_progress_bar()
戻り値の型:

Iterator[Callable[[int, int], None]]

class nitrokey.nk3.updates.Updater

ベースクラス: object

__init__(ui, await_bootloader, await_device, ignore_warnings=frozenset({}))
パラメータ:
  • ui (UpdateUi)

  • await_bootloader (Callable[[], NK3Bootloader])

  • await_device (Callable[[int | None, Callable[[int, int], None] | None], NK3])

  • ignore_warnings (Set[Warning])

戻り値の型:

None

update(device, image, update_version, ignore_pynitrokey_version=False)
パラメータ:
  • device (TrussedBase)

  • image (str | None)

  • update_version (str | None)

  • ignore_pynitrokey_version (bool)

戻り値の型:

Version

class nitrokey.nk3.updates.Warning

ベースクラス: Enum

ファームウェアのアップデート中に発生する可能性のある警告。

デフォルトでは、これらの警告はファームウェア・アップデートを中止する。 この列挙型を使用することで、ファームウェア・アップデートを失敗させず、無視すべき警告のタイプを選択することができる。

classmethod from_str(s)
パラメータ:

s (str)

戻り値の型:

Warning

IFS_MIGRATION_V2 = 'ifs-migration-v2'
MISSING_STATUS = 'missing-status'
SDK_VERSION = 'sdk-version'
UPDATE_FROM_BOOTLOADER = 'update-from-bootloader'
property message: str
nitrokey.nk3.updates.get_firmware_update(release)
パラメータ:

release (Release)

戻り値の型:

Asset