summaryrefslogtreecommitdiff
path: root/kvmd/apps
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-09-09 13:33:59 +0300
committerDevaev Maxim <[email protected]>2020-09-09 13:33:59 +0300
commit2e6d6593ecb29cf5a9732826bc0fb6ab6ca8f652 (patch)
tree530329f44b57ae88a3453094e74dca96d20f4b63 /kvmd/apps
parent91557ebbafa80d03574fa886ede1f09f6024c28c (diff)
mute
Diffstat (limited to 'kvmd/apps')
-rw-r--r--kvmd/apps/kvmd/ugpio.py10
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)