mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-05 13:01:12 +00:00
core: fix unexpected messages in debug mode (fixes #809)
This commit is contained in:
parent
cf73d8e499
commit
0df3c64855
@ -281,12 +281,16 @@ async def handle_session(iface: WireInterface, session_id: int) -> None:
|
|||||||
await req_reader.aopen()
|
await req_reader.aopen()
|
||||||
|
|
||||||
if __debug__:
|
if __debug__:
|
||||||
|
try:
|
||||||
|
msg_type = messages.get_type(req_reader.type).__name__
|
||||||
|
except KeyError:
|
||||||
|
msg_type = "%d - unknown message type" % req_reader.type
|
||||||
log.debug(
|
log.debug(
|
||||||
__name__,
|
__name__,
|
||||||
"%s:%x receive: %s",
|
"%s:%x receive: <%s>",
|
||||||
iface.iface_num(),
|
iface.iface_num(),
|
||||||
session_id,
|
session_id,
|
||||||
messages.get_type(req_reader.type),
|
msg_type,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# We have a reader left over from earlier. We should process
|
# We have a reader left over from earlier. We should process
|
||||||
|
Loading…
Reference in New Issue
Block a user