diff --git a/pytec/pytec/gui/model/thermostat.py b/pytec/pytec/gui/model/thermostat.py index 0fca9dc..90ad78b 100644 --- a/pytec/pytec/gui/model/thermostat.py +++ b/pytec/pytec/gui/model/thermostat.py @@ -32,10 +32,7 @@ class Thermostat(QObject, metaclass=PropertyMeta): if self.task.exception() is not None: try: raise self.task.exception() - except ( - TimeoutError, - asyncio.TimeoutError, # Remove in Python 3.11 - ): + except asyncio.TimeoutError: logging.error( "Encountered an error while updating parameter tree.", exc_info=True, diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 3233c77..12b6c62 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -264,7 +264,7 @@ class MainWindow(QtWidgets.QMainWindow): await self.bail() # TODO: Remove asyncio.TimeoutError in Python 3.11 - except (OSError, TimeoutError, asyncio.TimeoutError): + except (OSError, asyncio.TimeoutError): try: await self.bail() except ConnectionResetError: