summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-03-04 17:21:12 +0200
committerMaxim Devaev <[email protected]>2023-03-04 17:21:12 +0200
commit73263ebe827c0a8fdcf16950b2543856c1e6c220 (patch)
tree6057c09503367b54194e1b3588554eb0f74b7381
parentedd9435945a93e343f47344b689a17837fd5a738 (diff)
msd: remove image from list only on success
-rw-r--r--kvmd/plugins/msd/otg/__init__.py2
1 files changed, 1 insertions, 1 deletions
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)