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

[tor-commits] [torflow/master] Fix a couple parse errors.



commit 8092aaf2c26c29bcee6684cc7237078745c5614f
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date:   Mon Oct 31 22:19:24 2011 -0700

    Fix a couple parse errors.
---
 NetworkScanners/BwAuthority/aggregate.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/NetworkScanners/BwAuthority/aggregate.py b/NetworkScanners/BwAuthority/aggregate.py
index 56bc85b..e168f2e 100755
--- a/NetworkScanners/BwAuthority/aggregate.py
+++ b/NetworkScanners/BwAuthority/aggregate.py
@@ -196,7 +196,7 @@ class ConsensusJunk:
     self.bwauth_pid_control = False
     try:
       cs_params = re.search("^params ((?:[\S]+=[\d]+[\s]?)+)",
-                                     cs_bytes, re.M).split()
+                                     cs_bytes, re.M).group(1).split()
       for p in cs_params:
         if p == "bwauthpid=1":
           self.bwauth_pid_control = True
@@ -207,7 +207,7 @@ class ConsensusJunk:
     self.bw_weights = {}
     try:
       bw_weights = re.search("^bandwidth-weights ((?:[\S]+=[\d]+[\s]?)+)",
-                           cs_bytes, re.M).groups(1)[0].split()
+                           cs_bytes, re.M).group(1).split()
       for b in bw_weights:
         pair = b.split("=")
         self.bw_weights[pair[0]] = int(pair[1])/10000.0



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