[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torflow/master] Fix accidental reset of circ_fail_rate.
commit 249764351c8884975bf7702f4bce4e344dbd3074
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date: Sat Nov 5 13:23:35 2011 -0700
Fix accidental reset of circ_fail_rate.
---
NetworkScanners/BwAuthority/aggregate.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/NetworkScanners/BwAuthority/aggregate.py b/NetworkScanners/BwAuthority/aggregate.py
index 521aee6..3b3dc14 100755
--- a/NetworkScanners/BwAuthority/aggregate.py
+++ b/NetworkScanners/BwAuthority/aggregate.py
@@ -154,11 +154,14 @@ class Line:
self.measured_at = timestamp
try:
self.circ_fail_rate = float(re.search("[\s]*circ_fail_rate=([\S]+)[\s]*", line).group(1))
- self.strm_fail_rate = float(re.search("[\s]*strm_fail_rate=([\S]+)[\s]*", line).group(1))
except:
self.circ_fail_rate = 0
+ try:
+ self.strm_fail_rate = float(re.search("[\s]*strm_fail_rate=([\S]+)[\s]*", line).group(1))
+ except:
self.strm_fail_rate = 0
+
class Vote:
def __init__(self, line):
# node_id=$DB8C6D8E0D51A42BDDA81A9B8A735B41B2CF95D1 bw=231000 diff=209281 nick=rainbowwarrior measured_at=1319822504
@@ -187,7 +190,6 @@ class VoteSet:
self.vote_map[vote.idhex] = vote
except IOError:
plog("NOTICE", "No previous vote data.")
- pass
# Misc items we need to get out of the consensus
class ConsensusJunk:
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits