There was an error while loading. Please reload this page.
1 parent 9978d7f commit d7d8e5dCopy full SHA for d7d8e5d
1 file changed
drivers/SR.py
@@ -36,7 +36,8 @@
36
getVdiTypeFromImageFormat,
37
ImageFormat,
38
parseImageFormats,
39
- STR_TO_IMAGE_FORMAT
+ STR_TO_IMAGE_FORMAT,
40
+ IMAGE_FORMAT_TO_STR,
41
)
42
43
from vditype import VdiType
@@ -565,7 +566,7 @@ def _init_image_formats(
565
566
def _resolve_vdi_type_from_image_format(self, image_format: ImageFormat) -> str:
567
if image_format in self.supported_image_formats:
568
return getVdiTypeFromImageFormat(image_format)
- raise xs_errors.XenError('VDIType', opterr=f'Unsupported image format `{image_format}`')
569
+ raise xs_errors.XenError('VDIType', opterr=f'Unsupported image format `{IMAGE_FORMAT_TO_STR[image_format]}`')
570
571
def _get_snap_vdi_type(self, vdi_type: str, size: int) -> str:
572
if VdiType.isCowImage(vdi_type):
0 commit comments