[virt-tools-list] [virt-manager PATCH] virt-image: hide "qcow" from error message

Giuseppe Scrivano gscrivan at redhat.com
Mon May 12 10:09:31 UTC 2014


Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1095204

Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
---
 virtinst/virtimage.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/virtinst/virtimage.py b/virtinst/virtimage.py
index 96871ae..14c67ee 100644
--- a/virtinst/virtimage.py
+++ b/virtinst/virtimage.py
@@ -241,9 +241,13 @@ class Disk(object):
                    Disk.FORMAT_VMDK,
                    Disk.FORMAT_ISO,
                    Disk.FORMAT_VDI]
+
+        hide = [Disk.FORMAT_QCOW]
+
         validate(formats.count(self.format) > 0,
                  _("The format for disk %s must be one of %s") %
-                 (self.file, ",".join(formats)))
+                 (self.file, ", ".join([x for x in formats if x not in hide])))
+
 
     def check_disk_signature(self, meter=None):
         try:
-- 
1.9.0




More information about the virt-tools-list mailing list