1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-05-24 09:48:45 +00:00

fix(core): remove calls to log on non-debug builds

This commit is contained in:
M1nd3r 2025-04-16 13:56:30 +02:00
parent a4e9a74988
commit 0b7221aa45

View File

@ -183,6 +183,7 @@ class Channel:
return received_message_handler.handle_received_message(self, buffer)
elif self.expected_payload_length + INIT_HEADER_LENGTH > self.bytes_read:
self.is_cont_packet_expected = True
if __debug__ and utils.ALLOW_DEBUG_MESSAGES:
self._log(
"CONT EXPECTED - read/expected:",
str(self.bytes_read)
@ -238,6 +239,7 @@ class Channel:
raise Exception(
"Channel is in a state that does not support fallback."
)
if __debug__ and utils.ALLOW_DEBUG_MESSAGES:
self._log("Started fallback read")
self._prepare_fallback()
except Exception:
@ -385,6 +387,7 @@ class Channel:
def _finish_fallback(self) -> None:
self.fallback_decrypt = False
self.busy_decoder = None
if __debug__ and utils.ALLOW_DEBUG_MESSAGES:
self._log("Finish fallback")
def _decrypt_single_packet_payload(