Skip to content

Commit 348121a

Browse files
author
Nikolai Lambrov
committed
Enhance VM updater to delete existing archive before downloading from S3
1 parent 62f0d8e commit 348121a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

frameworks/vm_manager/vm_updater.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ def download(self) -> None:
282282
Download VM archive from S3.
283283
"""
284284
if not self.s3.is_exists_object(str(self.archive_path), self.s3_object_key):
285+
File.delete(str(self.archive_path), stdout=False) if isfile(str(self.archive_path)) else None
285286
self.s3.download_file(self.s3_object_key, str(self.archive_path))
286287
self.__downloaded = True
287288
else:

0 commit comments

Comments
 (0)