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

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



commit 3a3940d19755ea7ce6939902025bdb21f27c0207
Author: aagbsn <aagbsn@xxxxxxxx>
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:



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