From dbfa32df3b05a39edfd556f0569b92a337528b72 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Mon, 24 Mar 2025 12:37:32 +0100 Subject: [PATCH] wip --- python/src/trezorlib/transport/thp/protocol_v2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/src/trezorlib/transport/thp/protocol_v2.py b/python/src/trezorlib/transport/thp/protocol_v2.py index 7bb789b0ce..904c29ea5d 100644 --- a/python/src/trezorlib/transport/thp/protocol_v2.py +++ b/python/src/trezorlib/transport/thp/protocol_v2.py @@ -49,7 +49,9 @@ class ProtocolV2Channel(Channel): def read(self, session_id: int) -> t.Any: sid, msg_type, msg_data = self.read_and_decrypt() if sid != session_id: - raise Exception("Received messsage on a different session.") + raise Exception( + f"Received messsage on a different session (expected/received): ({session_id}/{sid}) " + ) return self.mapping.decode(msg_type, msg_data) def write(self, session_id: int, msg: t.Any) -> None: