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.
This commit is contained in:
Tiago Ilieve 2014-06-07 12:36:50 -03:00
parent 9c0a0ade08
commit aa1f8cf189

View file

@ -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)