From 7f455f9931a1ab380ff8d1392661ccf08cc76697 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Tue, 2 Apr 2024 17:11:26 +0200 Subject: [PATCH] Fix thp_v1 style --- core/src/trezor/wire/thp_v1.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/src/trezor/wire/thp_v1.py b/core/src/trezor/wire/thp_v1.py index ccf3550c2..ea0aa9a95 100644 --- a/core/src/trezor/wire/thp_v1.py +++ b/core/src/trezor/wire/thp_v1.py @@ -16,10 +16,7 @@ from .thp.channel import ( load_cached_channels, ) from .thp.checksum import CHECKSUM_LENGTH -from .thp.thp_messages import ( - CODEC_V1, - InitHeader, -) +from .thp.thp_messages import CODEC_V1, InitHeader from .thp.thp_session import ThpError if TYPE_CHECKING: @@ -86,7 +83,7 @@ def _get_buffer_for_payload( raise ThpError("Message too large") if payload_length > len(existing_buffer): return _try_allocate_new_buffer(payload_length) - return _reuse_existing_buffer(existing_buffer, payload_length) + return _reuse_existing_buffer(payload_length, existing_buffer) def _try_allocate_new_buffer(payload_length: int) -> utils.BufferType: