[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/master] Log fingerprint safely and safely iterate over long lists



commit 22b1e2eb898a77e269673bc495b3d412ee4c8673
Author: Matthew Finkel <Matthew.Finkel@xxxxxxxxx>
Date:   Thu Mar 13 12:31:45 2014 +0000

    Log fingerprint safely and safely iterate over long lists
---
 lib/bridgedb/Bridges.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py
index 1dc4f4e..579dfee 100644
--- a/lib/bridgedb/Bridges.py
+++ b/lib/bridgedb/Bridges.py
@@ -1251,8 +1251,9 @@ class FilteredBridgeSplitter(BridgeHolder):
             return
 
         index = 0
-        logging.debug("Inserting %s into %s ring" % (bridge.fingerprint, self.key))
-        for old_bridge in self.bridges:
+        logging.debug("Inserting %s into splitter"
+                      % (Util.logSafely(bridge.fingerprint)))
+        for old_bridge in self.bridges[:]:
             if bridge.fingerprint == old_bridge.fingerprint:
                 self.bridges[index] = bridge
                 break



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits