svc/conntrack.in (kickpeers): Rename `map' variable.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 29 Sep 2017 00:13:53 +0000 (01:13 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 28 Jun 2018 23:29:24 +0000 (00:29 +0100)
We shall want to call the `map' function.

svc/conntrack.in

index 043c969..99491b1 100644 (file)
@@ -361,7 +361,7 @@ def kickpeers():
 
       ## 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:
@@ -374,7 +374,7 @@ def kickpeers():
         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
@@ -382,14 +382,14 @@ def kickpeers():
             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