2
0
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:
Jarrod Johnson 2017-08-23 11:16:07 -04:00
parent 9798f30ef8
commit e1eafa46f9

View File

@ -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.