mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 12:00:59 +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()
|
||||
|
||||
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(
|
||||
__name__,
|
||||
"%s:%x receive: %s",
|
||||
"%s:%x receive: <%s>",
|
||||
iface.iface_num(),
|
||||
session_id,
|
||||
messages.get_type(req_reader.type),
|
||||
msg_type,
|
||||
)
|
||||
else:
|
||||
# We have a reader left over from earlier. We should process
|
||||
|
Loading…
Reference in New Issue
Block a user