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

[no changelog]
pull/2934/head
matejcik 1 year ago
parent 4cd88e16f7
commit 799c420dda

@ -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)

Loading…
Cancel
Save