Skip to content

Commit c64e999

Browse files
committed
fix: test
1 parent 987cc0b commit c64e999

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roborock/cloud_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ def _mqtt_on_disconnect(
130130
client: mqtt.Client,
131131
data: object,
132132
flags: dict[str, int],
133-
rc: ReasonCode,
133+
rc: ReasonCode | None,
134134
properties: mqtt.Properties | None = None,
135135
):
136136
try:
137-
exc = RoborockException(str(rc)) if rc.is_failure else None
137+
exc = RoborockException(str(rc)) if rc is not None and rc.is_failure else None
138138
super().on_connection_lost(exc)
139139
connection_queue = self._waiting_queue.get(DISCONNECT_REQUEST_ID)
140140
if connection_queue:

0 commit comments

Comments
 (0)