diff mbox

[5/5] KVM test: Make it possible to run VMs without NICs

Message ID 1277422386-13516-5-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues June 24, 2010, 11:33 p.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index 7b1fc05..3c01fa0 100755
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -118,8 +118,9 @@  class VM:
         self.root_dir = root_dir
         self.address_cache = address_cache
         self.netdev_id = []
-        for nic in params.get("nics").split():
-            self.netdev_id.append(kvm_utils.generate_random_id())
+        if params.get("nics"):
+            for nic in params.get("nics").split():
+                self.netdev_id.append(kvm_utils.generate_random_id())
 
         # Find a unique identifier for this VM
         while True: