From 1d7d4100a57b5d654c1434c91e97187fe25698ef Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Sat, 6 Jun 2020 06:29:29 +0300 Subject: common component interface --- kvmd/plugins/atx/disabled.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kvmd/plugins/atx/disabled.py') diff --git a/kvmd/plugins/atx/disabled.py b/kvmd/plugins/atx/disabled.py index d480a337..93cfbb5b 100644 --- a/kvmd/plugins/atx/disabled.py +++ b/kvmd/plugins/atx/disabled.py @@ -37,7 +37,7 @@ class AtxDisabledError(AtxOperationError): # ===== class Plugin(BaseAtx): - def get_state(self) -> Dict: + async def get_state(self) -> Dict: return { "enabled": False, "busy": False, @@ -49,7 +49,7 @@ class Plugin(BaseAtx): async def poll_state(self) -> AsyncGenerator[Dict, None]: while True: - yield self.get_state() + yield (await self.get_state()) await aiotools.wait_infinite() # ===== -- cgit v1.2.3