From aa1f8cf1893bc23f1e8162a2bbfa1d55ef33c951 Mon Sep 17 00:00:00 2001 From: Tiago Ilieve Date: Sat, 7 Jun 2014 12:36:50 -0300 Subject: [PATCH] Update volume image path after move it The `loopback.MoveImage` task wasn't updating `info.volume.image_path` after moving the volume image file. That made `volume.Delete` to fail when called, because it would try to remove a file that didn't exist anymore. --- bootstrapvz/common/tasks/loopback.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrapvz/common/tasks/loopback.py b/bootstrapvz/common/tasks/loopback.py index 8283320..77f562a 100644 --- a/bootstrapvz/common/tasks/loopback.py +++ b/bootstrapvz/common/tasks/loopback.py @@ -45,6 +45,7 @@ class MoveImage(Task): destination = os.path.join(info.manifest.bootstrapper['workspace'], filename) import shutil shutil.move(info.volume.image_path, destination) + info.volume.image_path = destination import logging log = logging.getLogger(__name__) log.info('The volume image has been moved to ' + destination)