summaryrefslogtreecommitdiff
path: root/kvmd/plugins/msd/disabled.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/plugins/msd/disabled.py')
-rw-r--r--kvmd/plugins/msd/disabled.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/kvmd/plugins/msd/disabled.py b/kvmd/plugins/msd/disabled.py
index ad49875e..b9f14f6e 100644
--- a/kvmd/plugins/msd/disabled.py
+++ b/kvmd/plugins/msd/disabled.py
@@ -40,6 +40,9 @@ class MsdDisabledError(MsdOperationError):
# =====
class Plugin(BaseMsd):
+ def __init__(self) -> None:
+ self.__notifier = aiotools.AioNotifier()
+
async def get_state(self) -> dict:
return {
"enabled": False,
@@ -49,10 +52,13 @@ class Plugin(BaseMsd):
"drive": None,
}
+ async def trigger_state(self) -> None:
+ self.__notifier.notify()
+
async def poll_state(self) -> AsyncGenerator[dict, None]:
while True:
+ await self.__notifier.wait()
yield (await self.get_state())
- await aiotools.wait_infinite()
async def reset(self) -> None:
raise MsdDisabledError()