diff options
author | Maxim Devaev <[email protected]> | 2022-08-05 15:07:17 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-08-05 15:07:17 +0300 |
commit | eeaeebf7c76385536eb8f5daaea5f21bda18b735 (patch) | |
tree | 5c8008edd4e4fea85da5e7e16f32389ede95f56a /kvmd/plugins/msd/relay/__init__.py | |
parent | 9ee63aba3ead6493acd01c89ffe17c503cdb4017 (diff) |
shield some finally ops
Diffstat (limited to 'kvmd/plugins/msd/relay/__init__.py')
-rw-r--r-- | kvmd/plugins/msd/relay/__init__.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kvmd/plugins/msd/relay/__init__.py b/kvmd/plugins/msd/relay/__init__.py index 14f903f1..9e507556 100644 --- a/kvmd/plugins/msd/relay/__init__.py +++ b/kvmd/plugins/msd/relay/__init__.py @@ -249,8 +249,14 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes yield self.__device_writer await self.__write_image_info(True) finally: - await self.__close_device_writer() - await self.__load_device_info() + try: + await asyncio.shield(self.__close_device_writer()) + except asyncio.CancelledError: + pass + try: + await asyncio.shield(self.__load_device_info()) + except asyncio.CancelledError: + pass @aiotools.atomic async def remove(self, name: str) -> None: |