mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 17:38:39 +00:00
trezorctl: print message name to output
This commit is contained in:
parent
8a663f7ec3
commit
ff157264a2
@ -81,7 +81,10 @@ def print_result(res, transport, path, verbose, is_json):
|
||||
else:
|
||||
click.echo(json.dumps(res, sort_keys=True, indent=4))
|
||||
else:
|
||||
if isinstance(res, list):
|
||||
from google.protobuf import text_format, message
|
||||
if isinstance(res, message.Message):
|
||||
click.echo('%s {\n%s}' % (res.DESCRIPTOR.name, text_format.MessageToString(res, indent=4)))
|
||||
elif isinstance(res, list):
|
||||
for line in res:
|
||||
click.echo(line)
|
||||
elif isinstance(res, dict):
|
||||
|
Loading…
Reference in New Issue
Block a user