diff options
author | Maxim Devaev <[email protected]> | 2022-08-07 19:35:08 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-08-07 19:35:08 +0300 |
commit | e37a7254d5cf7e4cfa5dcfbbaf5b0e9d7474d154 (patch) | |
tree | c25210abfceb0da0725798105a389c5598694ff7 /kvmd/plugins/msd/otg/__init__.py | |
parent | fdc3edfa799b21f04a83676459bab7a4e67b056f (diff) |
using shield_fg() in atomic (now atomic_fg)
Diffstat (limited to 'kvmd/plugins/msd/otg/__init__.py')
-rw-r--r-- | kvmd/plugins/msd/otg/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kvmd/plugins/msd/otg/__init__.py b/kvmd/plugins/msd/otg/__init__.py index cb781fae..5a8b86a6 100644 --- a/kvmd/plugins/msd/otg/__init__.py +++ b/kvmd/plugins/msd/otg/__init__.py @@ -246,7 +246,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes async def systask(self) -> None: await self.__watch_inotify() - @aiotools.atomic + @aiotools.atomic_fg async def reset(self) -> None: async with self.__state.busy(check_online=False): try: @@ -257,14 +257,14 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes except Exception: get_logger(0).exception("Can't reset MSD properly") - @aiotools.atomic + @aiotools.atomic_fg async def cleanup(self) -> None: await self.__close_reader() await self.__close_writer() # ===== - @aiotools.atomic + @aiotools.atomic_fg async def set_params( self, name: Optional[str]=None, @@ -299,7 +299,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes if rw: self.__state.vd.cdrom = False - @aiotools.atomic + @aiotools.atomic_fg async def set_connected(self, connected: bool) -> None: async with self.__state.busy(): assert self.__state.vd @@ -407,7 +407,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes # так что форсим обновление вручную, чтобы получить актуальное состояние. await aiotools.shield_fg(self.__reload_state()) - @aiotools.atomic + @aiotools.atomic_fg async def remove(self, name: str) -> None: async with self.__state.busy(): assert self.__state.storage |