mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-24 17:58:45 +00:00
fix(core): remove calls to log on non-debug builds
This commit is contained in:
parent
a4e9a74988
commit
0b7221aa45
@ -183,6 +183,7 @@ class Channel:
|
|||||||
return received_message_handler.handle_received_message(self, buffer)
|
return received_message_handler.handle_received_message(self, buffer)
|
||||||
elif self.expected_payload_length + INIT_HEADER_LENGTH > self.bytes_read:
|
elif self.expected_payload_length + INIT_HEADER_LENGTH > self.bytes_read:
|
||||||
self.is_cont_packet_expected = True
|
self.is_cont_packet_expected = True
|
||||||
|
if __debug__ and utils.ALLOW_DEBUG_MESSAGES:
|
||||||
self._log(
|
self._log(
|
||||||
"CONT EXPECTED - read/expected:",
|
"CONT EXPECTED - read/expected:",
|
||||||
str(self.bytes_read)
|
str(self.bytes_read)
|
||||||
@ -238,6 +239,7 @@ class Channel:
|
|||||||
raise Exception(
|
raise Exception(
|
||||||
"Channel is in a state that does not support fallback."
|
"Channel is in a state that does not support fallback."
|
||||||
)
|
)
|
||||||
|
if __debug__ and utils.ALLOW_DEBUG_MESSAGES:
|
||||||
self._log("Started fallback read")
|
self._log("Started fallback read")
|
||||||
self._prepare_fallback()
|
self._prepare_fallback()
|
||||||
except Exception:
|
except Exception:
|
||||||
@ -385,6 +387,7 @@ class Channel:
|
|||||||
def _finish_fallback(self) -> None:
|
def _finish_fallback(self) -> None:
|
||||||
self.fallback_decrypt = False
|
self.fallback_decrypt = False
|
||||||
self.busy_decoder = None
|
self.busy_decoder = None
|
||||||
|
if __debug__ and utils.ALLOW_DEBUG_MESSAGES:
|
||||||
self._log("Finish fallback")
|
self._log("Finish fallback")
|
||||||
|
|
||||||
def _decrypt_single_packet_payload(
|
def _decrypt_single_packet_payload(
|
||||||
|
Loading…
Reference in New Issue
Block a user