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

[tor-commits] [bridgedb/master] Log countryCodes in BridgeRing.getBridges().



commit 06f67dc2cb58ea304e4873fbf2f34da412056ea6
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Sun Jan 12 03:05:16 2014 +0000

    Log countryCodes in BridgeRing.getBridges().
    
    This is to see if they are ever actually passed into this function. They
    weren't being used anywhere inside BridgeRing.getBridges(), nor anywhere
    else.
---
 lib/bridgedb/Bridges.py |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py
index 416c1df..73f7d4e 100644
--- a/lib/bridgedb/Bridges.py
+++ b/lib/bridgedb/Bridges.py
@@ -853,6 +853,14 @@ class BridgeRing(BridgeHolder):
         :rtype: list
         :returns: A list of :class:`~bridgedb.Bridges.Bridge`s.
         """
+        # XXX This can be removed after we determine if countryCode is ever
+        # actually being used. It seems the countryCode should be passed in
+        # from bridgedb.HTTPServer.WebResource.getBridgeRequestAnswer() in
+        # order to hand out bridges which are believed to not be blocked in a
+        # given country.
+        if countryCode:
+            logging.debug("getBridges: countryCode=%r" % countryCode)
+
         forced = []
         for _, _, count, subring in self.subrings:
             if len(subring) < count:



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