1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-17 05:03:07 +00:00

fix(python): support all image types in firmware-fingerprint.py

[no changelog]
This commit is contained in:
matejcik 2023-04-04 17:11:53 +02:00
parent 4cd88e16f7
commit 799c420dda

View File

@ -21,7 +21,7 @@ from typing import BinaryIO, TextIO
import click
from trezorlib import firmware
from trezorlib._internal import firmware_headers
@click.command()
@ -32,7 +32,7 @@ def firmware_fingerprint(filename: BinaryIO, output: TextIO) -> None:
data = filename.read()
try:
click.echo(firmware.parse(data).digest().hex(), file=output)
click.echo(firmware_headers.parse_image(data).digest().hex(), file=output)
except Exception as e:
click.echo(e, err=True)
sys.exit(2)