For unittesting, for example, is interesting that we run the VM with the bare mininum number of parameters. This fix allows that. Signed-off-by: Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx> --- client/tests/kvm/kvm_vm.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) 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: -- 1.7.0.1 -- 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