diff options
author | Maxim Devaev <[email protected]> | 2022-08-05 18:19:31 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-08-05 18:19:31 +0300 |
commit | d21e74700a5b236ea19981ff74724790a8bc4efc (patch) | |
tree | 9bda87884ece795b05a81bfc4863b4562e84d9ca /kvmd/plugins | |
parent | eeaeebf7c76385536eb8f5daaea5f21bda18b735 (diff) |
shielded some tasks
Diffstat (limited to 'kvmd/plugins')
-rw-r--r-- | kvmd/plugins/ugpio/otgconf.py | 6 |
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: |