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/msd/otg/__init__.py | |
parent | e855976f05775359b774c3d5d6c3a6f6532efce6 (diff) |
changed region methods to async
Diffstat (limited to 'kvmd/plugins/msd/otg/__init__.py')
-rw-r--r-- | kvmd/plugins/msd/otg/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/plugins/msd/otg/__init__.py b/kvmd/plugins/msd/otg/__init__.py index 24d666f9..ff5014cb 100644 --- a/kvmd/plugins/msd/otg/__init__.py +++ b/kvmd/plugins/msd/otg/__init__.py @@ -114,7 +114,7 @@ class _State: @contextlib.asynccontextmanager async def busy(self, check_online: bool=True) -> AsyncGenerator[None, None]: - with self._region: + async with self._region: async with self._lock: await self.__notifier.notify() if check_online: @@ -304,7 +304,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes @contextlib.asynccontextmanager async def write_image(self, name: str) -> AsyncGenerator[None, None]: try: - with self.__state._region: # pylint: disable=protected-access + async with self.__state._region: # pylint: disable=protected-access try: async with self.__state._lock: # pylint: disable=protected-access await self.__state_notifier.notify() |