diff options
author | Devaev Maxim <[email protected]> | 2020-03-02 01:26:43 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-03-02 01:26:43 +0300 |
commit | 8972357dbc2147c1a02fd3470befd2b4aed9fc05 (patch) | |
tree | 63dfcdf09da43327bd48ba641a399d6ded3bb71d /kvmd/plugins/atx/gpio.py | |
parent | e855976f05775359b774c3d5d6c3a6f6532efce6 (diff) |
changed region methods to async
Diffstat (limited to 'kvmd/plugins/atx/gpio.py')
-rw-r--r-- | kvmd/plugins/atx/gpio.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/plugins/atx/gpio.py b/kvmd/plugins/atx/gpio.py index cca58a18..51b063bc 100644 --- a/kvmd/plugins/atx/gpio.py +++ b/kvmd/plugins/atx/gpio.py @@ -162,7 +162,7 @@ class Plugin(BaseAtx): # pylint: disable=too-many-instance-attributes @aiotools.atomic async def __click(self, name: str, pin: int, delay: float) -> None: - with self.__region.exit_only_on_exception(): + async with self.__region.exit_only_on_exception(): await self.__inner_click(name, pin, delay) @aiotools.tasked @@ -176,5 +176,5 @@ class Plugin(BaseAtx): # pylint: disable=too-many-instance-attributes gpio.write(pin, False) await asyncio.sleep(1) finally: - self.__region.exit() + await self.__region.exit() get_logger(0).info("Clicked ATX button %r", name) |