mirror of
https://github.com/esphome/esphome.git
synced 2026-09-19 11:08:38 +00:00
[ota] Fix check_error skipping validation for RESPONSE_OK (#15501)
This commit is contained in:
+2
-2
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user