mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
serial hid: clear events on exceptions
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user