mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
msd: remove image from list only on success
This commit is contained in:
parent
edd9435945
commit
73263ebe82
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user