Skip to content

Commit a4b7c92

Browse files
committed
fix: ensure that result is not none
1 parent 8c91999 commit a4b7c92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roborock/protocols/v1_protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def decode_rpc_response(message: RoborockMessage) -> ResponseMessage:
155155
exc: RoborockException | None = None
156156
if error := data_point_response.get("error"):
157157
exc = RoborockException(error)
158-
if not (result := data_point_response.get("result")):
158+
if (result := data_point_response.get("result")) is None:
159159
exc = RoborockException(f"Invalid V1 message format: missing 'result' in data point for {message.payload!r}")
160160
else:
161161
_LOGGER.debug("Decoded V1 message result: %s", result)

0 commit comments

Comments
 (0)