summaryrefslogtreecommitdiff
path: root/kvmd/plugins
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-08-05 18:19:31 +0300
committerMaxim Devaev <[email protected]>2022-08-05 18:19:31 +0300
commitd21e74700a5b236ea19981ff74724790a8bc4efc (patch)
tree9bda87884ece795b05a81bfc4863b4562e84d9ca /kvmd/plugins
parenteeaeebf7c76385536eb8f5daaea5f21bda18b735 (diff)
shielded some tasks
Diffstat (limited to 'kvmd/plugins')
-rw-r--r--kvmd/plugins/ugpio/otgconf.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/kvmd/plugins/ugpio/otgconf.py b/kvmd/plugins/ugpio/otgconf.py
index 8b888c8e..efe1b5c4 100644
--- a/kvmd/plugins/ugpio/otgconf.py
+++ b/kvmd/plugins/ugpio/otgconf.py
@@ -123,8 +123,10 @@ class Plugin(BaseUserGpioDriver):
else:
os.unlink(os.path.join(self.__profile_path, pin))
finally:
- await asyncio.sleep(self.__init_delay)
- self.__set_udc_enabled(True)
+ try:
+ await asyncio.sleep(self.__init_delay)
+ finally:
+ self.__set_udc_enabled(True)
def __set_udc_enabled(self, enabled: bool) -> None:
with open(self.__udc_path, "w") as udc_file: