From 73263ebe827c0a8fdcf16950b2543856c1e6c220 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sat, 4 Mar 2023 17:21:12 +0200 Subject: msd: remove image from list only on success --- kvmd/plugins/msd/otg/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kvmd/plugins/msd/otg/__init__.py b/kvmd/plugins/msd/otg/__init__.py index d7bbb571..b39ca564 100644 --- a/kvmd/plugins/msd/otg/__init__.py +++ b/kvmd/plugins/msd/otg/__init__.py @@ -375,11 +375,11 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes if self.__state.vd.image == image: self.__state.vd.image = None - del self.__state.storage.images[name] await self.__remount_rw(True) try: image.remove(fatal=True) + del self.__state.storage.images[name] finally: await self.__remount_rw(False, fatal=False) -- cgit v1.2.3