summaryrefslogtreecommitdiff
path: root/kvmd/plugins/ugpio/otgconf.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/plugins/ugpio/otgconf.py')
-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: