From patchwork Tue Jul 5 20:10:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 946462 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p65KActk027030 for ; Tue, 5 Jul 2011 20:10:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754381Ab1GEUKf (ORCPT ); Tue, 5 Jul 2011 16:10:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2910 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754220Ab1GEUKf (ORCPT ); Tue, 5 Jul 2011 16:10:35 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p65KAYTf022425 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Jul 2011 16:10:34 -0400 Received: from freedom.redhat.com (vpn-8-95.rdu.redhat.com [10.11.8.95]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p65KAW1B010426; Tue, 5 Jul 2011 16:10:32 -0400 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH] KVM test: A couple of fixes for unattended install Date: Tue, 5 Jul 2011 17:10:30 -0300 Message-Id: <1309896630-3211-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 05 Jul 2011 20:10:38 +0000 (UTC) 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 --- 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'