Correct error msg variable that could be unassigned

volume could be unassigned when this message is constructed,
I've changed the format variable to loc.volume_id which should
always be present in this except block.

Change-Id: I2d488fea73d3eb63b2b4682229c3d7fa362414fd
This commit is contained in:
Matt Smith 2017-01-17 15:47:55 -08:00
parent ee6840c92e
commit ccc9696e3f
1 changed files with 1 additions and 1 deletions

View File

@ -582,7 +582,7 @@ class Store(glance_store.driver.Store):
return (iterator, chunk_size or size)
except cinder_exception.NotFound:
reason = _("Failed to get image size due to "
"volume can not be found: %s") % volume.id
"volume can not be found: %s") % loc.volume_id
LOG.error(reason)
raise exceptions.NotFound(reason)
except cinder_exception.ClientException as e: