diff options
author | Devaev Maxim <[email protected]> | 2020-10-14 17:01:10 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-10-14 17:01:10 +0300 |
commit | d769742768d891a2ef868925ca35ae5e6b4e23f3 (patch) | |
tree | 7cfcdfca83fc253caa8abdef5d9f9e32751aa813 /kvmd/plugins/hid | |
parent | c4dc68bee5a0ae1389ecdf715f556f37d671231e (diff) |
serial hid: clear events on exceptions
Diffstat (limited to 'kvmd/plugins/hid')
-rw-r--r-- | kvmd/plugins/hid/serial.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kvmd/plugins/hid/serial.py b/kvmd/plugins/hid/serial.py index 0eaacfb7..17378e6a 100644 --- a/kvmd/plugins/hid/serial.py +++ b/kvmd/plugins/hid/serial.py @@ -348,12 +348,14 @@ class Plugin(BaseHid, multiprocessing.Process): # pylint: disable=too-many-inst self.clear_events() except serial.SerialException as err: + self.clear_events() if err.errno == errno.ENOENT: logger.error("Missing HID serial device: %s", self.__device_path) else: logger.exception("Unexpected HID error") except Exception: + self.clear_events() logger.exception("Unexpected HID error") finally: |