summaryrefslogtreecommitdiff
path: root/kvmd/plugins/atx
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-09-10 04:48:19 +0300
committerDevaev Maxim <[email protected]>2020-09-10 04:48:19 +0300
commit31fdcd2f3c9284cf72d6b92d51b88273d50e8dc1 (patch)
treea91720c1d012a3fc71920622b60ea029686a18f4 /kvmd/plugins/atx
parent015baee6d719723672037b0ea738106fbd2c8198 (diff)
removed processing flag
Diffstat (limited to 'kvmd/plugins/atx')
-rw-r--r--kvmd/plugins/atx/__init__.py8
-rw-r--r--kvmd/plugins/atx/disabled.py10
-rw-r--r--kvmd/plugins/atx/gpio.py16
3 files changed, 11 insertions, 23 deletions
diff --git a/kvmd/plugins/atx/__init__.py b/kvmd/plugins/atx/__init__.py
index 5de306ea..e600aa16 100644
--- a/kvmd/plugins/atx/__init__.py
+++ b/kvmd/plugins/atx/__init__.py
@@ -59,16 +59,16 @@ class BaseAtx(BasePlugin):
# =====
- async def power_on(self, wait: bool) -> bool:
+ async def power_on(self, wait: bool) -> None:
raise NotImplementedError
- async def power_off(self, wait: bool) -> bool:
+ async def power_off(self, wait: bool) -> None:
raise NotImplementedError
- async def power_off_hard(self, wait: bool) -> bool:
+ async def power_off_hard(self, wait: bool) -> None:
raise NotImplementedError
- async def power_reset_hard(self, wait: bool) -> bool:
+ async def power_reset_hard(self, wait: bool) -> None:
raise NotImplementedError
# =====
diff --git a/kvmd/plugins/atx/disabled.py b/kvmd/plugins/atx/disabled.py
index c60e2743..ba5bf1f0 100644
--- a/kvmd/plugins/atx/disabled.py
+++ b/kvmd/plugins/atx/disabled.py
@@ -54,12 +54,8 @@ class Plugin(BaseAtx):
# =====
- async def __stub_power(self, wait: bool) -> bool:
+ async def __stub(self, wait: bool) -> None:
raise AtxDisabledError()
- power_on = power_off = power_off_hard = power_reset_hard = __stub_power
-
- async def __stub_click(self, wait: bool) -> None:
- raise AtxDisabledError()
-
- click_power = click_power_long = click_reset = __stub_click
+ power_on = power_off = power_off_hard = power_reset_hard = __stub
+ click_power = click_power_long = click_reset = __stub
diff --git a/kvmd/plugins/atx/gpio.py b/kvmd/plugins/atx/gpio.py
index 9ae16338..df65e88e 100644
--- a/kvmd/plugins/atx/gpio.py
+++ b/kvmd/plugins/atx/gpio.py
@@ -130,29 +130,21 @@ class Plugin(BaseAtx): # pylint: disable=too-many-instance-attributes
# =====
- async def power_on(self, wait: bool) -> bool:
+ async def power_on(self, wait: bool) -> None:
if not (await self.__get_power()):
await self.click_power(wait)
- return True
- return False
- async def power_off(self, wait: bool) -> bool:
+ async def power_off(self, wait: bool) -> None:
if (await self.__get_power()):
await self.click_power(wait)
- return True
- return False
- async def power_off_hard(self, wait: bool) -> bool:
+ async def power_off_hard(self, wait: bool) -> None:
if (await self.__get_power()):
await self.click_power_long(wait)
- return True
- return False
- async def power_reset_hard(self, wait: bool) -> bool:
+ async def power_reset_hard(self, wait: bool) -> None:
if (await self.__get_power()):
await self.click_reset(wait)
- return True
- return False
# =====