forked from M-Labs/thermostat
Raise if OSError
This commit is contained in:
parent
93e0bd91bf
commit
506d350d7f
@ -257,9 +257,11 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
await self._connecting_task
|
await self._connecting_task
|
||||||
except (OSError, asyncio.TimeoutError, asyncio.CancelledError):
|
except (OSError, asyncio.TimeoutError, asyncio.CancelledError) as exc:
|
||||||
await self.bail()
|
await self.bail()
|
||||||
return
|
if isinstance(exc, asyncio.CancelledError):
|
||||||
|
return
|
||||||
|
raise
|
||||||
else:
|
else:
|
||||||
await self._on_connection_changed(True)
|
await self._on_connection_changed(True)
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
Reference in New Issue
Block a user