From 233cc08dc62ad0fd2ee92ac7c0777374d530a5b9 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 21 Sep 2025 10:27:27 -0600 Subject: [PATCH] remove unreachable code --- esphome/espota2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/esphome/espota2.py b/esphome/espota2.py index ba47e6af0d..6e8936668b 100644 --- a/esphome/espota2.py +++ b/esphome/espota2.py @@ -286,8 +286,9 @@ def perform_ota( [RESPONSE_REQUEST_AUTH, RESPONSE_REQUEST_SHA256_AUTH, RESPONSE_AUTH_OK], ) - hash_func, nonce_size, hash_name = _AUTH_METHODS[auth] - perform_auth(sock, password, hash_func, nonce_size, hash_name) + if auth != RESPONSE_AUTH_OK: + hash_func, nonce_size, hash_name = _AUTH_METHODS[auth] + perform_auth(sock, password, hash_func, nonce_size, hash_name) # Set higher timeout during upload sock.settimeout(30.0)