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

[tor-commits] [bridgedb/master] Return True if we were able to prepopulate sub hashrings.



commit 2f115411616b3a477aff94bb3def6c15a32704f5
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Sun Jan 5 17:28:19 2014 +0000

    Return True if we were able to prepopulate sub hashrings.
    
    In bridgedb.Bridges.FilteredBridgeSplitter.prepopulateRings(), we return
    False if we were unable to prepopulate bridges into the sub hashring for
    whatever reason. In case some calling function wants to use the boolean
    return value as a check, we should mirror this logic and return True if
    prepopulation was successful.
---
 lib/bridgedb/Bridges.py |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/bridgedb/Bridges.py b/lib/bridgedb/Bridges.py
index 328cd2e..be88001 100644
--- a/lib/bridgedb/Bridges.py
+++ b/lib/bridgedb/Bridges.py
@@ -1026,6 +1026,8 @@ class FilteredBridgeSplitter(BridgeHolder):
             logging.info("Inserted %d bridges into hashring %s!"
                          % (inserted, ringname))
 
+        return True
+
     def dumpAssignments(self, f, description=""):
         # one ring per filter set
         # bridges may be present in multiple filter sets



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