Timeout Error things

This commit is contained in:
atse 2024-07-05 17:31:55 +08:00
parent c1fdcda621
commit 54bedc3a83
2 changed files with 2 additions and 5 deletions

View File

@ -32,10 +32,7 @@ class Thermostat(QObject, metaclass=PropertyMeta):
if self.task.exception() is not None: if self.task.exception() is not None:
try: try:
raise self.task.exception() raise self.task.exception()
except ( except asyncio.TimeoutError:
TimeoutError,
asyncio.TimeoutError, # Remove in Python 3.11
):
logging.error( logging.error(
"Encountered an error while updating parameter tree.", "Encountered an error while updating parameter tree.",
exc_info=True, exc_info=True,

View File

@ -264,7 +264,7 @@ class MainWindow(QtWidgets.QMainWindow):
await self.bail() await self.bail()
# TODO: Remove asyncio.TimeoutError in Python 3.11 # TODO: Remove asyncio.TimeoutError in Python 3.11
except (OSError, TimeoutError, asyncio.TimeoutError): except (OSError, asyncio.TimeoutError):
try: try:
await self.bail() await self.bail()
except ConnectionResetError: except ConnectionResetError: