From 0baf98459a379b9a5b52b0a6feb43d9af94c0612 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Wed, 24 Apr 2024 11:05:52 +0200 Subject: [PATCH] Unify if conditions order --- core/src/trezor/wire/thp/ack_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/trezor/wire/thp/ack_handler.py b/core/src/trezor/wire/thp/ack_handler.py index 10840823d..4f32dfedc 100644 --- a/core/src/trezor/wire/thp/ack_handler.py +++ b/core/src/trezor/wire/thp/ack_handler.py @@ -16,7 +16,7 @@ def is_ack_valid(cache: SessionThpCache | ChannelCache, sync_bit: int) -> bool: def _is_ack_expected(cache: SessionThpCache | ChannelCache) -> bool: is_expected: bool = not THP.sync_can_send_message(cache) - if not is_expected and __debug__: + if __debug__ and not is_expected: log.debug(__name__, "Received unexpected ACK message") return is_expected