[or-cvs] r19663: {bridgedb} Try a little harder to make sure that clearning clears every (bridgedb/trunk/lib/bridgedb)

nickm at seul.org nickm at seul.org
Mon Jun 8 19:18:44 UTC 2009


Author: nickm
Date: 2009-06-08 15:18:44 -0400 (Mon, 08 Jun 2009)
New Revision: 19663

Modified:
   bridgedb/trunk/lib/bridgedb/Bridges.py
Log:
Try a little harder to make sure that clearning clears everything

Modified: bridgedb/trunk/lib/bridgedb/Bridges.py
===================================================================
--- bridgedb/trunk/lib/bridgedb/Bridges.py	2009-06-08 19:00:21 UTC (rev 19662)
+++ bridgedb/trunk/lib/bridgedb/Bridges.py	2009-06-08 19:18:44 UTC (rev 19663)
@@ -269,8 +269,12 @@
     def clear(self):
         self.bridges = {}
         self.bridgesByID = {}
+        self.isSorted = False
         self.sortedKeys = []
 
+        for tp, val, count, subring in self.subrings:
+            subring.clear()
+
     def insert(self, bridge):
         """Add a bridge to the ring.  If the bridge is already there,
            replace the old one."""



More information about the tor-commits mailing list