summaryrefslogtreecommitdiffstats
path: root/nova/image
diff options
context:
space:
mode:
authorStanislaw Pitucha <stanislaw.pitucha@hp.com>2013-06-13 13:57:15 +0000
committerStanislaw Pitucha <stanislaw.pitucha@hp.com>2013-06-13 17:04:08 +0000
commit9f7eaca80d259201844f097fec24d1e9fe9fb5e3 (patch)
tree2e2c40b54a0d7c1b7e73818c281ad375d0a99861 /nova/image
parent77595f8e08a61507ad5c7c990651fd4f8131c150 (diff)
Remove trivial cases of unused variables (1)
Kill some of the variables marked as unused by flakes8. This should allow to enable F841 check in the future. Only trivial cases with no function calls and obviously pure functions (like datetime.now(), or len()) are cleaned up here. Part 1, split to reduce conflicts. Change-Id: I82854349574ec4bcb9336aba626eefdaed81a8c8
Diffstat (limited to 'nova/image')
-rw-r--r--nova/image/s3.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/nova/image/s3.py b/nova/image/s3.py
index 42cb97170..a1ae55b4e 100644
--- a/nova/image/s3.py
+++ b/nova/image/s3.py
@@ -198,13 +198,11 @@ class S3ImageService(object):
def _s3_parse_manifest(self, context, metadata, manifest):
manifest = etree.fromstring(manifest)
image_format = 'ami'
- image_type = 'machine'
try:
kernel_id = manifest.find('machine_configuration/kernel_id').text
if kernel_id == 'true':
image_format = 'aki'
- image_type = 'kernel'
kernel_id = None
except Exception:
kernel_id = None
@@ -213,7 +211,6 @@ class S3ImageService(object):
ramdisk_id = manifest.find('machine_configuration/ramdisk_id').text
if ramdisk_id == 'true':
image_format = 'ari'
- image_type = 'ramdisk'
ramdisk_id = None
except Exception:
ramdisk_id = None
@@ -270,7 +267,7 @@ class S3ImageService(object):
#TODO(bcwaldon): right now, this removes user-defined ids.
# We need to re-enable this.
- image_id = metadata.pop('id', None)
+ metadata.pop('id', None)
image = self.service.create(context, metadata)