[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH] virtinst : fix virtmanager qemu commandline at new vm (format=<empty string>)



The code was querying format tag content instead of its type attribute.

 Here is a fix.

diff -r 2ca5493b648a virtinst/VirtualDisk.py
--- a/virtinst/VirtualDisk.py   Tue Jul 28 22:17:24 2009 -0400
+++ b/virtinst/VirtualDisk.py   Thu Jul 30 17:43:28 2009 +0200
@@ -470,7 +470,7 @@

         if self.vol_object:
             drvtype = _util.get_xml_path(self.vol_object.XMLDesc(0),
-                                         "/volume/target/format")
+                                         "/volume/target/format/@type")

         elif self.vol_install:
             if drvname == self.DRIVER_QEMU:
diff -r 2ca5493b648a virtinst/VirtualDisk.py
--- a/virtinst/VirtualDisk.py	Tue Jul 28 22:17:24 2009 -0400
+++ b/virtinst/VirtualDisk.py	Thu Jul 30 17:43:28 2009 +0200
@@ -470,7 +470,7 @@
 
         if self.vol_object:
             drvtype = _util.get_xml_path(self.vol_object.XMLDesc(0),
-                                         "/volume/target/format")
+                                         "/volume/target/format/@type")
 
         elif self.vol_install:
             if drvname == self.DRIVER_QEMU:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]