Remove undefined variable in exception message
In case of container format and disk format don’t match and the container format is one of ami, ari, aki UnboundLocalError will be raised since disk_format variable in the exception message isn’t defined. Change-Id: Ibe44317a2750ed29d72928f72f909f037169f1b1
This commit is contained in:
parent
fcefb26f2a
commit
ead5bf61e4
|
@ -43,7 +43,8 @@ def get_container_and_disk_format():
|
|||
else:
|
||||
msg = ("The container format and the disk format don't match. "
|
||||
"Container format: %(container)s, Disk format: %(disk)s." %
|
||||
{'container': container_format, 'disk': disk_format})
|
||||
{'container': container_format, 'disk':
|
||||
CONF.image.disk_formats})
|
||||
raise exceptions.InvalidConfiguration(msg)
|
||||
else:
|
||||
disk_format = CONF.image.disk_formats[0]
|
||||
|
|
Loading…
Reference in New Issue