Skip to content

Commit 701a49e

Browse files
author
Nikolai Lambrov
committed
Fix VmUpdater to use is_file() method for checking archive existence before download from S3
1 parent 348121a commit 701a49e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frameworks/vm_manager/vm_updater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +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
285+
File.delete(str(self.archive_path), stdout=False) if self.archive_path.is_file() else None
286286
self.s3.download_file(self.s3_object_key, str(self.archive_path))
287287
self.__downloaded = True
288288
else:

0 commit comments

Comments
 (0)