[tor-commits] [bridgedb/master] 5482 - Sort bridges by weightedFractionalUptime

aagbsn at torproject.org aagbsn at torproject.org
Wed Apr 17 00:26:44 UTC 2013


commit 3a3940d19755ea7ce6939902025bdb21f27c0207
Author: aagbsn <aagbsn at extc.org>
Date:   Tue Oct 30 07:37:40 2012 -0700

    5482 - Sort bridges by weightedFractionalUptime
    
    And print the time on same address next to the bridge line
---
 lib/bridgedb/Bucket.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bridgedb/Bucket.py b/lib/bridgedb/Bucket.py
index bb8fa04..6b13a7f 100644
--- a/lib/bridgedb/Bucket.py
+++ b/lib/bridgedb/Bucket.py
@@ -212,8 +212,8 @@ class BucketManager:
         for b in bridges:
             bh = self.db.getBridgeHistory(b.hex_key)
             if bh: bridgeHistories.append(bh)
-        bridgeHistories.sort(lambda x,y: cmp(x.tosa, y.tosa))
-
+        bridgeHistories.sort(lambda x,y: cmp(x.weightedFractionalUptime,
+            y.weightedFractionalUptime))
         try:
             f = open(filename, 'w')
             for bh in bridgeHistories:





More information about the tor-commits mailing list