diff options
author | Maxim Devaev <[email protected]> | 2022-08-07 19:18:23 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-08-07 19:18:23 +0300 |
commit | fdc3edfa799b21f04a83676459bab7a4e67b056f (patch) | |
tree | 9c91c905c241094bfde6a620cc81b476a9f3f9ab /kvmd/plugins/msd/relay/__init__.py | |
parent | 1d4b39ef1b039e7eeb2ceca74a7f9d40bfbeb0c0 (diff) |
using shield_fg()
Diffstat (limited to 'kvmd/plugins/msd/relay/__init__.py')
-rw-r--r-- | kvmd/plugins/msd/relay/__init__.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/kvmd/plugins/msd/relay/__init__.py b/kvmd/plugins/msd/relay/__init__.py index f6b13dc5..febc3750 100644 --- a/kvmd/plugins/msd/relay/__init__.py +++ b/kvmd/plugins/msd/relay/__init__.py @@ -250,13 +250,9 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes await self.__write_image_info(True) finally: try: - await asyncio.shield(self.__close_device_writer()) - except asyncio.CancelledError: - pass - try: - await asyncio.shield(self.__load_device_info()) - except asyncio.CancelledError: - pass + await aiotools.shield_fg(self.__close_device_writer()) + finally: + await aiotools.shield_fg(self.__load_device_info()) @aiotools.atomic async def remove(self, name: str) -> None: |