[ota] Fix check_error skipping validation for RESPONSE_OK (#15501)

This commit is contained in:
Jonathan Swoboda
2026-04-06 22:17:25 -04:00
committed by GitHub
parent 96c3986481
commit 517d0390d0
+2 -2
View File
@@ -130,7 +130,7 @@ def check_error(data: list[int] | bytes, expect: int | list[int] | None) -> None
:param expect: Expected response code(s), None to skip validation.
:raises OTAError: If an error code is detected or response doesn't match expected.
"""
if not expect:
if expect is None:
return
if not data:
raise OTAError(
@@ -278,7 +278,7 @@ def perform_ota(
raise OTAError("ESP requests password, but no password given!")
nonce_bytes = receive_exactly(
sock, nonce_size, f"{hash_name} authentication nonce", [], decode=False
sock, nonce_size, f"{hash_name} authentication nonce", None, decode=False
)
assert isinstance(nonce_bytes, bytes)
nonce = nonce_bytes.decode()