1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 04:18:10 +00:00

fix(core/python): print correct model in print_firmware_version

This commit is contained in:
tychovrahe 2023-08-18 10:16:56 +02:00 committed by TychoVrahe
parent 7cf3a655e5
commit 1b08be0186
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
Fixed printing Trezor model when validating firmware image

View File

@ -70,7 +70,7 @@ def print_firmware_version(fw: "firmware.FirmwareType") -> None:
click.echo("Trezor One v2 firmware (1.8.0 or later)") click.echo("Trezor One v2 firmware (1.8.0 or later)")
_print_version(fw.header.version) _print_version(fw.header.version)
elif isinstance(fw, firmware.VendorFirmware): elif isinstance(fw, firmware.VendorFirmware):
click.echo("Trezor T firmware image.") click.echo(f"{fw.vendor_header.hw_model} firmware image.")
vendor = fw.vendor_header.text vendor = fw.vendor_header.text
vendor_version = "{}.{}".format(*fw.vendor_header.version) vendor_version = "{}.{}".format(*fw.vendor_header.version)
click.echo(f"Vendor header from {vendor}, version {vendor_version}") click.echo(f"Vendor header from {vendor}, version {vendor_version}")