forked from M-Labs/thermostat
asyncio.TimeoutError not needed
This commit is contained in:
parent
5b372a4298
commit
3de016de63
|
@ -77,7 +77,7 @@ class WrappedClient(QObject, Client):
|
|||
async def _read_line(self):
|
||||
try:
|
||||
return await super()._read_line()
|
||||
except (OSError, TimeoutError, asyncio.TimeoutError) as e: # TODO: Remove asyncio.TimeoutError in Python 3.11
|
||||
except (OSError, TimeoutError) as e:
|
||||
logging.error("Client connection error, disconnecting", exc_info=True)
|
||||
self.connection_error.emit()
|
||||
|
||||
|
@ -686,7 +686,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
else:
|
||||
await self.bail()
|
||||
|
||||
except (OSError, TimeoutError, asyncio.TimeoutError) as e: # TODO: Remove asyncio.TimeoutError in Python 3.11
|
||||
except (OSError, TimeoutError) as e:
|
||||
logging.error(f"Failed communicating to {host}:{port}: {e}")
|
||||
await self.bail()
|
||||
|
||||
|
|
Loading…
Reference in New Issue