[tor-commits] [bridgedb/master] 5482 - Keep track of timestamps parsed from NS

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


commit ef71dd383675af60399eed51da24884c8e75d54f
Author: aagbsn <aagbsn at extc.org>
Date:   Mon Nov 5 13:08:22 2012 -0800

    5482 - Keep track of timestamps parsed from NS
---
 lib/bridgedb/Main.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/bridgedb/Main.py b/lib/bridgedb/Main.py
index 808da43..f081064 100644
--- a/lib/bridgedb/Main.py
+++ b/lib/bridgedb/Main.py
@@ -166,6 +166,7 @@ def load(cfg, splitter, clear=False):
     logging.info("Loading bridges")
     status = {}
     addresses = {}
+    timestamps = {}
     if hasattr(cfg, "STATUS_FILE"):
         f = open(cfg.STATUS_FILE, 'r')
         for ID, running, stable, or_addresses, timestamp in Bridges.parseStatusFile(f):
@@ -191,7 +192,7 @@ def load(cfg, splitter, clear=False):
             # XXX: what do we do with all these or_addresses?
             # The bridge stability metrics are only concerned with a single ip:port
             # So for now, we will only consider the bridges primary IP:port
-            ts = timestamps[ID][:]
+            ts = timestamps[bridge.getID()][:]
             ts.sort()
             for timestamp in ts:
                 bridgedb.Stability.addOrUpdateBridgeHistory(bridge, timestamp)





More information about the tor-commits mailing list