forked from M-Labs/thermostat
Compacting
This commit is contained in:
parent
16369cec71
commit
f7665ea736
@ -259,19 +259,17 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
await self._connecting_task
|
await self._connecting_task
|
||||||
except (OSError, asyncio.TimeoutError):
|
except (OSError, asyncio.TimeoutError, asyncio.CancelledError):
|
||||||
await self.bail()
|
await self.bail()
|
||||||
return
|
return
|
||||||
except asyncio.CancelledError:
|
|
||||||
return
|
|
||||||
else:
|
else:
|
||||||
await self._on_connection_changed(True)
|
await self._on_connection_changed(True)
|
||||||
finally:
|
finally:
|
||||||
self._connecting_task = None
|
self._connecting_task = None
|
||||||
|
|
||||||
else:
|
elif self._connecting_task is not None:
|
||||||
if self._connecting_task is not None:
|
|
||||||
self._connecting_task.cancel()
|
self._connecting_task.cancel()
|
||||||
|
else:
|
||||||
await self.bail()
|
await self.bail()
|
||||||
|
|
||||||
@asyncSlot()
|
@asyncSlot()
|
||||||
|
Loading…
Reference in New Issue
Block a user