diff --git a/pytec/pytec/gui/model/thermostat.py b/pytec/pytec/gui/model/thermostat.py index 28c85db..16e51fc 100644 --- a/pytec/pytec/gui/model/thermostat.py +++ b/pytec/pytec/gui/model/thermostat.py @@ -40,15 +40,13 @@ class Thermostat(QObject, metaclass=PropertyMeta): self.task = asyncio.create_task(self.update_params()) while True: if self.task.done(): - if self.task.exception() is not None: - try: - raise self.task.exception() - except asyncio.TimeoutError: - logging.error( - "Encountered an error while updating parameter tree.", - exc_info=True, - ) - _ = self.task.result() + try: + _ = self.task.result() + except asyncio.TimeoutError: + logging.error( + "Encountered an error while updating parameter tree.", + exc_info=True, + ) self.task = asyncio.create_task(self.update_params()) await asyncio.sleep(self._update_s)