[tor-commits] [bridgedb/master] Log a message if there is a duplicate bridge from a sub-hashring.

isis at torproject.org isis at torproject.org
Sun Jan 12 06:06:36 UTC 2014


commit df660bb6369eedcd3ea0e0949beee66148fcb460
Author: Isis Lovecruft <isis at torproject.org>
Date:   Sun Jan 12 03:29:54 2014 +0000

    Log a message if there is a duplicate bridge from a sub-hashring.
---
 lib/bridgedb/Bridges.py |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py
index 73f7d4e..f9bbd56 100644
--- a/lib/bridgedb/Bridges.py
+++ b/lib/bridgedb/Bridges.py
@@ -871,6 +871,10 @@ class BridgeRing(BridgeHolder):
         for k in forced + self._getBridgeKeysAt(pos, N):
             if k not in keys:
                 keys.append(k)
+            else:
+                logging.debug(
+                    "Got duplicate bridge %r in main hashring for position %r."
+                    % (Util.logSafely(k.encode('hex')), pos.encode('hex')))
         keys = keys[:N]
         keys.sort()
 





More information about the tor-commits mailing list