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