Fix error while refreshing ip if the virtual nic doesn't have any ip
Signed-off-by: Lin Ma <lma@suse.com>
This commit is contained in:
parent
b99731397b
commit
be8dfc25f7
|
@ -1197,6 +1197,8 @@ class vmmDomain(vmmLibvirtObject):
|
|||
for addrs in info.values():
|
||||
if addrs["hwaddr"] != iface.macaddr:
|
||||
continue
|
||||
if not addrs["addrs"]:
|
||||
continue
|
||||
for addr in addrs["addrs"]:
|
||||
if addr["type"] == 0:
|
||||
ipv4 = addr["addr"]
|
||||
|
|
Loading…
Reference in New Issue