mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-09 08:58:27 +03:00
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:
parent
fab55c128f
commit
86e2c23d71
@ -138,13 +138,14 @@ class vmmInterface(vmmLibvirtObject):
|
|||||||
return None, []
|
return None, []
|
||||||
|
|
||||||
ret = []
|
ret = []
|
||||||
for ip in activeProto.ips:
|
if activeProto:
|
||||||
ipstr = ip.address
|
for ip in activeProto.ips:
|
||||||
if not ipstr:
|
ipstr = ip.address
|
||||||
continue
|
if not ipstr:
|
||||||
if ip.prefix:
|
continue
|
||||||
ipstr += "/%s" % ip.prefix
|
if ip.prefix:
|
||||||
ret.append(ipstr)
|
ipstr += "/%s" % ip.prefix
|
||||||
|
ret.append(ipstr)
|
||||||
return inactiveProto or activeProto, ret
|
return inactiveProto or activeProto, ret
|
||||||
|
|
||||||
def get_ipv4(self):
|
def get_ipv4(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user