From 1b08be018603af91969d4072d0e0eafef293d5fb Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Fri, 18 Aug 2023 10:16:56 +0200 Subject: [PATCH] fix(core/python): print correct model in print_firmware_version --- python/.changelog.d/3227.fixed | 1 + python/src/trezorlib/cli/firmware.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 python/.changelog.d/3227.fixed diff --git a/python/.changelog.d/3227.fixed b/python/.changelog.d/3227.fixed new file mode 100644 index 000000000..25a2040f2 --- /dev/null +++ b/python/.changelog.d/3227.fixed @@ -0,0 +1 @@ +Fixed printing Trezor model when validating firmware image diff --git a/python/src/trezorlib/cli/firmware.py b/python/src/trezorlib/cli/firmware.py index 7599dff8e..4035bd0c4 100644 --- a/python/src/trezorlib/cli/firmware.py +++ b/python/src/trezorlib/cli/firmware.py @@ -70,7 +70,7 @@ def print_firmware_version(fw: "firmware.FirmwareType") -> None: click.echo("Trezor One v2 firmware (1.8.0 or later)") _print_version(fw.header.version) 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_version = "{}.{}".format(*fw.vendor_header.version) click.echo(f"Vendor header from {vendor}, version {vendor_version}")