Fixed pikvm/pikvm#783: remove incomplete msd image

This commit is contained in:
Maxim Devaev
2022-07-30 18:15:50 +03:00
parent 5ee8f7a7a3
commit 589ec14de0
6 changed files with 29 additions and 10 deletions

View File

@@ -229,8 +229,10 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
raise MsdMultiNotSupported()
@contextlib.asynccontextmanager
async def write_image(self, name: str, size: int) -> AsyncGenerator[int, None]:
async def write_image(self, name: str, size: int, remove_incomplete: Optional[bool]) -> AsyncGenerator[int, None]:
async with self.__working():
if remove_incomplete is not None:
raise MsdMultiNotSupported()
async with self.__region:
try:
assert self.__device_info