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:
|
if self.__state.vd.image == image:
|
||||||
self.__state.vd.image = None
|
self.__state.vd.image = None
|
||||||
del self.__state.storage.images[name]
|
|
||||||
|
|
||||||
await self.__remount_rw(True)
|
await self.__remount_rw(True)
|
||||||
try:
|
try:
|
||||||
image.remove(fatal=True)
|
image.remove(fatal=True)
|
||||||
|
del self.__state.storage.images[name]
|
||||||
finally:
|
finally:
|
||||||
await self.__remount_rw(False, fatal=False)
|
await self.__remount_rw(False, fatal=False)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user