mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-26 11:30:23 +00:00
Be robust in handler init withotu addresses set
This commit is contained in:
parent
9798f30ef8
commit
e1eafa46f9
@ -25,16 +25,16 @@ class NodeHandler(object):
|
||||
self._fp = None
|
||||
self.info = info
|
||||
self.configmanager = configmanager
|
||||
targsa = None
|
||||
targsa = [None]
|
||||
# first let us prefer LLA if possible, since that's most stable
|
||||
for sa in info['addresses']:
|
||||
if sa[0].startswith('fe80'):
|
||||
targsa = sa
|
||||
break
|
||||
else:
|
||||
targsa = info['addresses'][0]
|
||||
if info['addresses']:
|
||||
targsa = info['addresses'][0]
|
||||
self.ipaddr = targsa[0]
|
||||
return
|
||||
|
||||
def scan(self):
|
||||
# Do completely passive things to enhance data.
|
||||
|
Loading…
Reference in New Issue
Block a user