Fix smartprotocol response list handler to handle null reponses (#884)

This commit is contained in:
Steven B 2024-04-29 14:24:30 +01:00 committed by GitHub
parent d7a36fe071
commit e7553a7af4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -206,7 +206,8 @@ class SmartProtocol(BaseProtocol):
self, response_result: dict[str, Any], method, retry_count
):
if (
isinstance(response_result, SmartErrorCode)
response_result is None
or isinstance(response_result, SmartErrorCode)
or "start_index" not in response_result
or (list_sum := response_result.get("sum")) is None
):