]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Defining the variable "tmp" before try block
authorBharat Kumar Kobagana <bkobagan@redhat.com>
Thu, 20 Nov 2014 11:39:38 +0000 (17:09 +0530)
committerBharat Kumar Kobagana <bkobagan@redhat.com>
Fri, 21 Nov 2014 03:10:02 +0000 (08:40 +0530)
commitec1189e4734ed9c1c39bab0175877bf011a32df0
treea2478140983b2633c5318b4493ff46bb04ab14f7
parent1d77d79f81cf5e6a808453432f6e510ad0ea5a25
Defining the variable "tmp" before try block

In file "image_utils.py", "tmp" variable initialized in try
block. So, if any exception occurred in the try block, then
"tmp" would not be assigned with any value. Because of this
finally block will raise an exception like "local variable
tmp tried to use before the assignment".

This patch resolves that issue by defining "tmp" variable before
try block.

Change-Id: I9d8c8eaaeba0a7aab7ebfc791b9ddd967f324184
Closes-Bug: #1394548
cinder/image/image_utils.py