From f0dddbae1407c0be00a32a034516b17298aba6e2 Mon Sep 17 00:00:00 2001 From: Stanislaw Pitucha Date: Sat, 4 Aug 2012 14:31:28 +0100 Subject: Remove unused variables fetch() no longer returns metadata so fetch_to_raw does not need to pass it. Callers don't expect the return value either. Output of execute() is not used for anything Change-Id: I84be22e042696a51eb919f6c6f0ccf58aaf3ace3 --- nova/virt/images.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'nova') diff --git a/nova/virt/images.py b/nova/virt/images.py index 5414fe367..9f53af645 100644 --- a/nova/virt/images.py +++ b/nova/virt/images.py @@ -74,7 +74,7 @@ def fetch(context, image_href, path, _user_id, _project_id): def fetch_to_raw(context, image_href, path, user_id, project_id): path_tmp = "%s.part" % path - metadata = fetch(context, image_href, path_tmp, user_id, project_id) + fetch(context, image_href, path_tmp, user_id, project_id) with utils.remove_path_on_error(path_tmp): data = qemu_img_info(path_tmp) @@ -94,8 +94,8 @@ def fetch_to_raw(context, image_href, path, user_id, project_id): staged = "%s.converted" % path LOG.debug("%s was %s, converting to raw" % (image_href, fmt)) with utils.remove_path_on_error(staged): - out, err = utils.execute('qemu-img', 'convert', '-O', 'raw', - path_tmp, staged) + utils.execute('qemu-img', 'convert', '-O', 'raw', path_tmp, + staged) data = qemu_img_info(staged) if data.get('file format') != "raw": @@ -107,5 +107,3 @@ def fetch_to_raw(context, image_href, path, user_id, project_id): else: os.rename(path_tmp, path) - - return metadata -- cgit