Skip to content

Commit 91071ab

Browse files
committed
chore: revert whitespace change
1 parent ae8eed6 commit 91071ab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

roborock/devices/device.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ async def connect_loop() -> None:
157157
while True:
158158
try:
159159
await self.connect()
160-
self._has_connected = True
161-
self._ready_callbacks(self)
162160
if not start_attempt.done():
163161
start_attempt.set_result(True)
162+
self._has_connected = True
163+
self._ready_callbacks(self)
164164
break
165165
except RoborockException as e:
166166
if not start_attempt.done():
@@ -174,9 +174,10 @@ async def connect_loop() -> None:
174174
self._logger.exception("Uncaught error during connect: %s", e)
175175
break
176176
except asyncio.CancelledError:
177+
self._logger.debug("connect_loop was cancelled for device %s", self.duid)
178+
finally:
177179
if not start_attempt.done():
178180
start_attempt.set_result(False)
179-
self._logger.debug("connect_loop was cancelled for device %s", self.duid)
180181

181182
self._connect_task = asyncio.create_task(connect_loop())
182183

0 commit comments

Comments
 (0)