Message ID | 1252519932-30733-17-git-send-email-mgoldish@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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)
(Avoid adding weird things like 'macaddr=None' to the command line.) Signed-off-by: Michael Goldish <mgoldish@redhat.com> --- client/tests/kvm/kvm_vm.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)