(Avoid adding weird things like 'macaddr=None' to the command line.)
Signed-off-by: Michael Goldish <[email protected]>
---
client/tests/kvm/kvm_vm.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index d360d8e..f728104 100755
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -234,7 +234,8 @@ class VM:
qemu_cmd += ",model=%s" % nic_params.get("nic_model")
if nic_params.has_key("address_index"):
mac, ip = kvm_utils.get_mac_ip_pair_from_dict(nic_params)
- qemu_cmd += ",macaddr=%s" % mac
+ if mac:
+ qemu_cmd += ",macaddr=%s" % mac
# Handle the '-net tap' or '-net user' part
mode = nic_params.get("nic_mode", "user")
qemu_cmd += " -net %s,vlan=%d" % (mode, vlan)
--
1.5.4.1
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html