summaryrefslogtreecommitdiff
path: root/kvmd/plugins/msd/relay.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-02-29 17:23:57 +0300
committerDevaev Maxim <[email protected]>2020-02-29 17:23:57 +0300
commit75d9b858d73bf3ed31597e554b27520e3e31f72e (patch)
treef52e60f468d7ad99d8e9abf2df590026a4502862 /kvmd/plugins/msd/relay.py
parent5ef5e00da9e5d15270cdc253eb67bef72174b78f (diff)
moved AioExclusiveRegion to aiotools
Diffstat (limited to 'kvmd/plugins/msd/relay.py')
-rw-r--r--kvmd/plugins/msd/relay.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/kvmd/plugins/msd/relay.py b/kvmd/plugins/msd/relay.py
index 4e621cc2..81456efa 100644
--- a/kvmd/plugins/msd/relay.py
+++ b/kvmd/plugins/msd/relay.py
@@ -40,7 +40,6 @@ import aiofiles.base
from ...logging import get_logger
from ... import aiotools
-from ... import aioregion
from ... import gpio
from ...yamlconf import Option
@@ -174,7 +173,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
self.__init_retries = init_retries
self.__reset_delay = reset_delay
- self.__region = aioregion.AioExclusiveRegion(MsdIsBusyError)
+ self.__region = aiotools.AioExclusiveRegion(MsdIsBusyError)
self.__device_info: Optional[_DeviceInfo] = None
self.__connected = False
@@ -235,7 +234,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
@aiotools.atomic
async def reset(self) -> None:
- with aiotools.unregion_only_on_exception(self.__region):
+ with self.__region.exit_only_on_exception():
await self.__inner_reset()
@aiotools.tasked