From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Wang Subject: [PATCH 6/9] KVM test: Raise error when met unknown type in kvm_vm.remote_login(). Date: Mon, 26 Apr 2010 18:04:10 +0800 Message-ID: <20100426100410.26268.75724.stgit@localhost.localdomain> References: <20100426095656.26268.50549.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: autotest@test.kernel.org, lmr@redhat.com Return-path: In-Reply-To: <20100426095656.26268.50549.stgit@localhost.localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org Need to raise the error when met the unknown type of shell_client in kvm_vm.remote_login() in order to avoid the traceback. Signed-off-by: Jason Wang --- client/tests/kvm/kvm_vm.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 8f4753f..0cdf925 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -806,7 +806,9 @@ class VM: elif client == "nc": session = kvm_utils.netcat(address, port, username, password, prompt, linesep, timeout) - + else: + raise error.TestError("Unknown shell_client type %s" % client) + if session: session.set_status_test_command(self.params.get("status_test_" "command", ""))