summaryrefslogtreecommitdiff
path: root/kvmd/plugins/hid/otg
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-09-08 05:24:47 +0300
committerDevaev Maxim <[email protected]>2020-09-08 05:24:47 +0300
commit605b67ca761bdb5f5c3b255434f30624fa82a6c1 (patch)
treed7821a55ca5ec9e2da6b75bf2956dea6345de1a1 /kvmd/plugins/hid/otg
parent4cc60e4d528c669af0c1f7478160ff57a4691af7 (diff)
refactoring
Diffstat (limited to 'kvmd/plugins/hid/otg')
-rw-r--r--kvmd/plugins/hid/otg/__init__.py8
-rw-r--r--kvmd/plugins/hid/otg/device.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/kvmd/plugins/hid/otg/__init__.py b/kvmd/plugins/hid/otg/__init__.py
index 575190e5..b9c2c5b8 100644
--- a/kvmd/plugins/hid/otg/__init__.py
+++ b/kvmd/plugins/hid/otg/__init__.py
@@ -51,10 +51,10 @@ class Plugin(BaseHid):
noop: bool,
) -> None:
- self.__state_notifier = aiomulti.AioProcessNotifier()
+ self.__notifier = aiomulti.AioProcessNotifier()
- self.__keyboard_proc = KeyboardProcess(noop=noop, state_notifier=self.__state_notifier, **keyboard)
- self.__mouse_proc = MouseProcess(noop=noop, state_notifier=self.__state_notifier, **mouse)
+ self.__keyboard_proc = KeyboardProcess(noop=noop, notifier=self.__notifier, **keyboard)
+ self.__mouse_proc = MouseProcess(noop=noop, notifier=self.__notifier, **mouse)
@classmethod
def get_plugin_options(cls) -> Dict:
@@ -101,7 +101,7 @@ class Plugin(BaseHid):
if state != prev_state:
yield state
prev_state = state
- await self.__state_notifier.wait()
+ await self.__notifier.wait()
async def reset(self) -> None:
self.__keyboard_proc.send_reset_event()
diff --git a/kvmd/plugins/hid/otg/device.py b/kvmd/plugins/hid/otg/device.py
index 45681aba..b777dd56 100644
--- a/kvmd/plugins/hid/otg/device.py
+++ b/kvmd/plugins/hid/otg/device.py
@@ -47,7 +47,7 @@ class BaseDeviceProcess(multiprocessing.Process): # pylint: disable=too-many-in
name: str,
read_size: int,
initial_state: Dict,
- state_notifier: aiomulti.AioProcessNotifier,
+ notifier: aiomulti.AioProcessNotifier,
device_path: str,
select_timeout: float,
@@ -69,7 +69,7 @@ class BaseDeviceProcess(multiprocessing.Process): # pylint: disable=too-many-in
self.__fd = -1
self.__events_queue: multiprocessing.queues.Queue = multiprocessing.Queue()
- self.__state_flags = aiomulti.AioSharedFlags({"online": True, **initial_state}, state_notifier)
+ self.__state_flags = aiomulti.AioSharedFlags({"online": True, **initial_state}, notifier)
self.__stop_event = multiprocessing.Event()
def run(self) -> None: