[PATCH v2 06/10] KVM test: Return none when met unknown type in kvm_vm.remote_login().

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

 



None is returned when met the unknown type of shell_client in
kvm_vm.remote_login() in order to avoid the traceback.

Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
---
 client/tests/kvm/kvm_vm.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index 8f4753f..cfebfc1 100755
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -806,7 +806,10 @@ class VM:
         elif client == "nc":
             session = kvm_utils.netcat(address, port, username, password,
                                        prompt, linesep, timeout)
-
+        else:
+            logging.error("Unknown shell_client type %s" % client)
+            return None
+            
         if session:
             session.set_status_test_command(self.params.get("status_test_"
                                                             "command", ""))

--
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