Change log message in get_qemu_data

The get_qemu_data method in image_utils file raises an exception when
disk_format is not of type RAW. The message supposed to say what disk type
are using, but return False instead.

So i change the log message to something more general, just specifying that
the disk are being used is not of RAW type.

Closes-Bug: #2008041
Change-Id: I5c73b85531897656cb6a9d55391933ce40eb0635
This commit is contained in:
Winicius Silva 2023-12-23 13:23:18 -03:00
parent 799569fa53
commit 38cdcc3b47
1 changed files with 3 additions and 4 deletions

View File

@ -657,10 +657,9 @@ def get_qemu_data(image_id: str,
if has_meta:
if not disk_format_raw:
raise exception.ImageUnacceptable(
reason=_("qemu-img is not installed and image is of "
"type %s. Only RAW images can be used if "
"qemu-img is not installed.") %
disk_format_raw,
reason=_("qemu-img is not installed and image is not of "
"type RAW. Only RAW images can be used if "
"qemu-img is not installed."),
image_id=image_id)
else:
raise exception.ImageUnacceptable(