]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Reduce the redundant variable declarations
authorls1175 <liusheng@huawei.com>
Tue, 31 Dec 2013 07:54:17 +0000 (15:54 +0800)
committerls1175 <liusheng@huawei.com>
Tue, 31 Dec 2013 08:01:16 +0000 (16:01 +0800)
The method create() in /cinder/api/v2/volumes.py has two redundant
variable declarations: image_href = None image_uuid = None
These should be reduced

Change-Id: If3798d4bd96998707d7a5f87ece95ed8c93cc042
Closes-bug: #1265148

cinder/api/v2/volumes.py

index 18d201d788958cad725d93c273d38aa42bb14ac9..1c65d33fd411d8deb14999b9c89cc325a9a8a486 100644 (file)
@@ -376,8 +376,6 @@ class VolumeController(wsgi.Controller):
 
         LOG.audit(_("Create volume of %s GB"), size, context=context)
 
-        image_href = None
-        image_uuid = None
         if self.ext_mgr.is_loaded('os-image-create'):
             image_href = volume.get('imageRef')
             if image_href: