[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/master] Make loop varnames in FilteredBridgeSplitter.addRing() more descriptive.
commit ee902b5c89ddba47b13e25a12818bc91e3441fd8
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date: Fri Nov 15 13:45:11 2013 +0000
Make loop varnames in FilteredBridgeSplitter.addRing() more descriptive.
---
lib/bridgedb/Bridges.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py
index f11a45e..036df88 100644
--- a/lib/bridgedb/Bridges.py
+++ b/lib/bridgedb/Bridges.py
@@ -1038,12 +1038,11 @@ class FilteredBridgeSplitter(BridgeHolder):
return
self.bridges.append(bridge)
-
- # insert in all matching rings
- for n,(f,r) in self.filterRings.items():
- if f(bridge):
- r.insert(bridge)
- logging.debug("insert bridge into %s" % n)
+ for ringname, (filterFn, subring) in self.filterRings.items():
+ if filterFn(bridge):
+ subring.insert(bridge)
+ logging.debug("Inserted bridge '%s' into '%s' sub hashring"
+ % (bridge.getID(), ringname))
def addRing(self, subring, ringname, filterFn, populate_from=None):
"""Add a subring to this hashring.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits