summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislaw Pitucha <stanislaw.pitucha@hp.com>2012-08-04 14:31:28 +0100
committerStanislaw Pitucha <stanislaw.pitucha@hp.com>2012-08-04 14:35:25 +0100
commitf0dddbae1407c0be00a32a034516b17298aba6e2 (patch)
treef2af557baa129ad739feb5868dde4c0bf3b2683d
parentff9578da2d042ba3d6cb7b6ded76de74c0754689 (diff)
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
-rw-r--r--nova/virt/images.py8
1 files changed, 3 insertions, 5 deletions
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