Skip to content

Commit 3fceb6b

Browse files
committed
fix: str some other rcs
1 parent 5634ff2 commit 3fceb6b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

roborock/cloud_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def _mqtt_on_message(self, *args, **kwargs):
119119
def _mqtt_on_disconnect(self, *args, **kwargs):
120120
_, __, rc, ___ = args
121121
try:
122-
exc = RoborockException(mqtt.error_string(rc)) if rc != mqtt.MQTT_ERR_SUCCESS else None
122+
exc = RoborockException(str(rc)) if rc != mqtt.MQTT_ERR_SUCCESS else None
123123
super().on_connection_lost(exc)
124124
connection_queue = self._waiting_queue.get(DISCONNECT_REQUEST_ID)
125125
if connection_queue:
@@ -145,7 +145,7 @@ def _sync_disconnect(self) -> Any:
145145

146146
if rc != mqtt.MQTT_ERR_SUCCESS:
147147
disconnected_future.cancel()
148-
raise RoborockException(f"Failed to disconnect ({mqtt.error_string(rc)})")
148+
raise RoborockException(f"Failed to disconnect ({str(rc)})")
149149

150150
return disconnected_future
151151

@@ -184,4 +184,4 @@ def _send_msg_raw(self, msg: bytes) -> None:
184184
f"rr/m/i/{self._mqtt_user}/{self._hashed_user}/{self.device_info.device.duid}", msg
185185
)
186186
if info.rc != mqtt.MQTT_ERR_SUCCESS:
187-
raise RoborockException(f"Failed to publish ({mqtt.error_string(info.rc)})")
187+
raise RoborockException(f"Failed to publish ({str(info.rc)})")

0 commit comments

Comments
 (0)