interface: don't print error for active interface without an IP address

If there is no IP address for active interface we need to skip
probing it.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1449509

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2017-05-10 10:00:39 +02:00
parent fab55c128f
commit 86e2c23d71

View File

@ -138,13 +138,14 @@ class vmmInterface(vmmLibvirtObject):
return None, []
ret = []
for ip in activeProto.ips:
ipstr = ip.address
if not ipstr:
continue
if ip.prefix:
ipstr += "/%s" % ip.prefix
ret.append(ipstr)
if activeProto:
for ip in activeProto.ips:
ipstr = ip.address
if not ipstr:
continue
if ip.prefix:
ipstr += "/%s" % ip.prefix
ret.append(ipstr)
return inactiveProto or activeProto, ret
def get_ipv4(self):