diff options
author | Devaev Maxim <[email protected]> | 2020-09-08 05:24:47 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-09-08 05:24:47 +0300 |
commit | 605b67ca761bdb5f5c3b255434f30624fa82a6c1 (patch) | |
tree | d7821a55ca5ec9e2da6b75bf2956dea6345de1a1 /kvmd/plugins/msd/relay.py | |
parent | 4cc60e4d528c669af0c1f7478160ff57a4691af7 (diff) |
refactoring
Diffstat (limited to 'kvmd/plugins/msd/relay.py')
-rw-r--r-- | kvmd/plugins/msd/relay.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/plugins/msd/relay.py b/kvmd/plugins/msd/relay.py index 96cb3c63..409d3d71 100644 --- a/kvmd/plugins/msd/relay.py +++ b/kvmd/plugins/msd/relay.py @@ -179,8 +179,8 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes self.__device_file: Optional[aiofiles.base.AiofilesContextManager] = None self.__written = 0 - self.__state_notifier = aiotools.AioNotifier() - self.__region = aiotools.AioExclusiveRegion(MsdIsBusyError, self.__state_notifier) + self.__notifier = aiotools.AioNotifier() + self.__region = aiotools.AioExclusiveRegion(MsdIsBusyError, self.__notifier) logger = get_logger(0) logger.info("Using %r as MSD", self.__device_path) @@ -234,7 +234,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes if state != prev_state: yield state prev_state = state - await self.__state_notifier.wait() + await self.__notifier.wait() @aiotools.atomic async def reset(self) -> None: @@ -317,7 +317,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes self.__written = 0 await self.__write_image_info(name, complete=False) - await self.__state_notifier.notify() + await self.__notifier.notify() yield await self.__write_image_info(name, complete=True) finally: |