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
diff --git a/tempest/api/image/v1/test_images.py b/tempest/api/image/v1/test_images.py
index b341ab7..76723f4 100644
--- a/tempest/api/image/v1/test_images.py
+++ b/tempest/api/image/v1/test_images.py
@@ -43,7 +43,8 @@
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]