Ensure http delay logic works during default login attempt (#959)

Ensures retryable exceptions are raised on failure to login with default login credentials.
This commit is contained in:
Steven B 2024-06-06 17:01:58 +01:00 committed by GitHub
parent 40e40522f9
commit 5befe51c42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,6 +28,8 @@ from .exceptions import (
DeviceError, DeviceError,
KasaException, KasaException,
SmartErrorCode, SmartErrorCode,
TimeoutError,
_ConnectionError,
_RetryableError, _RetryableError,
) )
from .httpclient import HttpClient from .httpclient import HttpClient
@ -220,7 +222,7 @@ class AesTransport(BaseTransport):
"%s: logged in with default credentials", "%s: logged in with default credentials",
self._host, self._host,
) )
except AuthenticationError: except (AuthenticationError, _ConnectionError, TimeoutError):
raise raise
except Exception as ex: except Exception as ex:
raise KasaException( raise KasaException(