From cd9d4cb78c9069e166bb618c78cd302514dd9c70 Mon Sep 17 00:00:00 2001 From: meow Date: Thu, 26 Dec 2019 14:30:15 +0500 Subject: [PATCH] Fix bug that cause failure of image resizing when creating vm --- ucloud/common/storage_handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ucloud/common/storage_handlers.py b/ucloud/common/storage_handlers.py index 4b7928e..4a17ec7 100644 --- a/ucloud/common/storage_handlers.py +++ b/ucloud/common/storage_handlers.py @@ -89,7 +89,7 @@ class FileSystemBasedImageStorageHandler(ImageStorageHandler): src = join_path(self.image_base, src) dest = join_path(self.vm_base, dest) try: - shutil.copy(src, dest) + shutil.copyfile(src, dest) except Exception as e: logger.exception(e) return False