[PATCH] KVM test: A couple of fixes for unattended install

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

 



Fix a typo and verify if virtio_network_installer
is actually set to something before trying to use
it as a class attribute.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx>
---
 client/tests/kvm/tests/unattended_install.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/client/tests/kvm/tests/unattended_install.py b/client/tests/kvm/tests/unattended_install.py
index 6d6ee07..1ff73af 100644
--- a/client/tests/kvm/tests/unattended_install.py
+++ b/client/tests/kvm/tests/unattended_install.py
@@ -354,7 +354,7 @@ class UnattendedInstallConfig(object):
         # component PnpCustomizationsWinPE Element Node
         if self.install_virtio == 'yes':
             paths = doc.getElementsByTagName("Path")
-            values = [self.virtio_storage_path, self.virtio_nework_path]
+            values = [self.virtio_storage_path, self.virtio_network_path]
             for path, value in zip(paths, values):
                 path_text = path.childNodes[0]
                 assert key_text.nodeType == doc.TEXT_NODE
@@ -373,7 +373,8 @@ class UnattendedInstallConfig(object):
             command_line_text = command_line.childNodes[0]
             assert command_line_text.nodeType == doc.TEXT_NODE
             dummy_re = 'KVM_TEST_VIRTIO_NETWORK_INSTALLER'
-            if self.install_virtio == 'yes':
+            if (self.install_virtio == 'yes' and
+                hasattr(self, 'virtio_network_installer_path')):
                 driver = self.virtio_network_installer_path
             else:
                 driver = 'dir'
-- 
1.7.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux