[virt-tools-list] [PATCH virtinst] add address element in hostdev xml when the values are present

Guannan Ren gren at redhat.com
Tue May 8 13:37:16 UTC 2012


---
 virtinst/VirtualHostDevice.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/virtinst/VirtualHostDevice.py b/virtinst/VirtualHostDevice.py
index cc87f7e..e3563f7 100644
--- a/virtinst/VirtualHostDevice.py
+++ b/virtinst/VirtualHostDevice.py
@@ -222,7 +222,7 @@ class VirtualHostDeviceUSB(VirtualHostDevice):
         if self.vendor and self.product:
             xml += "        <vendor id='%s'/>\n" % self.vendor
             xml += "        <product id='%s'/>\n" % self.product
-        elif self.bus and self.device:
+        if self.bus and self.device:
             xml += "        <address bus='%s' device='%s'/>\n" % (self.bus,
                                                                   self.device)
         else:
-- 
1.7.7.5




More information about the virt-tools-list mailing list