diff options
-rw-r--r-- | kvmd/plugins/atx/gpio.py | 5 | ||||
-rw-r--r-- | kvmd/plugins/hid/serial.py | 5 | ||||
-rw-r--r-- | kvmd/plugins/msd/relay.py | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/kvmd/plugins/atx/gpio.py b/kvmd/plugins/atx/gpio.py index bd49513c..70354da4 100644 --- a/kvmd/plugins/atx/gpio.py +++ b/kvmd/plugins/atx/gpio.py @@ -133,7 +133,10 @@ class Plugin(BaseAtx): # pylint: disable=too-many-instance-attributes async def cleanup(self) -> None: if self.__chip: - self.__chip.close() + try: + self.__chip.close() + except Exception: + pass # ===== diff --git a/kvmd/plugins/hid/serial.py b/kvmd/plugins/hid/serial.py index 23f6c136..ff018826 100644 --- a/kvmd/plugins/hid/serial.py +++ b/kvmd/plugins/hid/serial.py @@ -176,7 +176,10 @@ class _Gpio: def close(self) -> None: if self.__chip: - self.__chip.close() + try: + self.__chip.close() + except Exception: + pass @aiotools.atomic async def reset(self) -> None: diff --git a/kvmd/plugins/msd/relay.py b/kvmd/plugins/msd/relay.py index 07e9f85e..64eab56e 100644 --- a/kvmd/plugins/msd/relay.py +++ b/kvmd/plugins/msd/relay.py @@ -183,7 +183,10 @@ class _Gpio: def close(self) -> None: if self.__chip: - self.__chip.close() + try: + self.__chip.close() + except Exception: + pass def switch_to_local(self) -> None: assert self.__target_line |