## Find out which peer in the group ought to be active.
ip = None
- map = {}
+ statemap = {}
want = None
for t, p, n in pp:
if p is None or not upness:
if upness and ip is None and \
ipq is not None and ipq.withinp(n):
if T._debug: print '# %s: SELECTED' % info
- map[t] = 'up'
+ statemap[t] = 'up'
select.append('%s=%s' % (g, t))
if t == 'down' or t.startswith('down/'):
want = None
want = t
ip = ipq
else:
- map[t] = 'down'
+ statemap[t] = 'down'
if T._debug: print '# %s: skipped' % info
## Shut down the wrong ones.
found = False
- if T._debug: print '# peer-map = %r' % map
+ if T._debug: print '# peer-map = %r' % statemap
for p in peers:
- what = map.get(p, 'leave')
+ what = statemap.get(p, 'leave')
if what == 'up':
found = True
if T._debug: print '# peer %s: already up' % p