Skip to content

Commit f6efebe

Browse files
committed
chore: go back to the other way
1 parent c59a2c0 commit f6efebe

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

roborock/protocols/v1_protocol.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,9 @@ 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 "result" not in data_point_response:
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}")
160-
result = {}
161160
else:
162-
result = data_point_response["result"]
163161
_LOGGER.debug("Decoded V1 message result: %s", result)
164162
if isinstance(result, str):
165163
if result == "unknown_method":

0 commit comments

Comments
 (0)