mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-01-24 05:37:59 +00:00
Fix smartprotocol response list handler to handle null reponses (#884)
This commit is contained in:
parent
d7a36fe071
commit
e7553a7af4
@ -206,7 +206,8 @@ class SmartProtocol(BaseProtocol):
|
|||||||
self, response_result: dict[str, Any], method, retry_count
|
self, response_result: dict[str, Any], method, retry_count
|
||||||
):
|
):
|
||||||
if (
|
if (
|
||||||
isinstance(response_result, SmartErrorCode)
|
response_result is None
|
||||||
|
or isinstance(response_result, SmartErrorCode)
|
||||||
or "start_index" not in response_result
|
or "start_index" not in response_result
|
||||||
or (list_sum := response_result.get("sum")) is None
|
or (list_sum := response_result.get("sum")) is None
|
||||||
):
|
):
|
||||||
|
Loading…
Reference in New Issue
Block a user