[virt-tools-list] [virt-manager PATCH 1/3] Fix error while refreshing ip if the virtual nic doesn't have any ip

Lin Ma lma at suse.com
Thu Sep 6 07:46:27 UTC 2018


Signed-off-by: Lin Ma <lma at suse.com>
---
 virtManager/domain.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/virtManager/domain.py b/virtManager/domain.py
index 3b1b43d1..b628b5cd 100644
--- a/virtManager/domain.py
+++ b/virtManager/domain.py
@@ -1200,6 +1200,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"]
-- 
2.15.1




More information about the virt-tools-list mailing list