diff options
Diffstat (limited to 'kvmd/plugins/hid/serial.py')
-rw-r--r-- | kvmd/plugins/hid/serial.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kvmd/plugins/hid/serial.py b/kvmd/plugins/hid/serial.py index 752870d7..cee0048d 100644 --- a/kvmd/plugins/hid/serial.py +++ b/kvmd/plugins/hid/serial.py @@ -298,7 +298,10 @@ class Plugin(BaseHid, multiprocessing.Process): # pylint: disable=too-many-inst def clear_events(self) -> None: while not self.__events_queue.empty(): - self.__events_queue.get_nowait() + try: + self.__events_queue.get_nowait() + except queue.Empty: + break self.__queue_event(_ClearEvent()) def __queue_event(self, event: _BaseEvent) -> None: |