mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
serial hid: clear events on exceptions
This commit is contained in:
parent
c4dc68bee5
commit
d769742768
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user