diff options
Diffstat (limited to 'kvmd')
-rw-r--r-- | kvmd/apps/kvmd/ugpio.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kvmd/apps/kvmd/ugpio.py b/kvmd/apps/kvmd/ugpio.py index 2cce6a51..cc394c95 100644 --- a/kvmd/apps/kvmd/ugpio.py +++ b/kvmd/apps/kvmd/ugpio.py @@ -182,10 +182,18 @@ class _GpioOutput: # pylint: disable=too-many-instance-attributes else: await aiotools.run_region_task( f"Can't perform pulse of {self} or operation was not completed", - self.__region, self.__inner_pulse, delay, + self.__region, self.__inner_pulse_tasked, delay, ) @aiotools.atomic + async def __inner_pulse_tasked(self, delay: float) -> None: + try: + await self.__inner_pulse(delay) + except GpioDriverOfflineError: + get_logger(0).error("Can't perform pulse of %s or operation was not completed" + " because the driver is offline", self) + + @aiotools.atomic async def __inner_pulse(self, delay: float) -> None: try: self.__write(True) |