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

[tor-commits] [sbws/master] Update scale-v3bw-with-budget.py to handle new v3bw format



commit d00fae040fb252ecb22de3516e2280bf0b554c5e
Author: Matt Traudt <sirmatt@xxxxxxx>
Date:   Tue Jun 26 12:31:59 2018 -0400

    Update scale-v3bw-with-budget.py to handle new v3bw format
---
 scripts/tools/scale-v3bw-with-budget.py | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/scripts/tools/scale-v3bw-with-budget.py b/scripts/tools/scale-v3bw-with-budget.py
index 3229e1e..62b17b4 100755
--- a/scripts/tools/scale-v3bw-with-budget.py
+++ b/scripts/tools/scale-v3bw-with-budget.py
@@ -24,18 +24,10 @@ def line_into_dict(line):
 def main(args):
     total_input_weight = 0
     line_dicts = []
-    is_first_line = True
     for line in args.input:
-        if is_first_line:
-            # First line is special and is supposed to be a timestamp
-            try:
-                int(line)
-            except ValueError as e:
-                fail_hard('First line should be an int.', e)
-            is_first_line = False
+        if 'node_id=' not in line:
             args.output.write(line)
             continue
-        # All lines but the first go through this
         d = line_into_dict(line)
         # Check that the required parts of the line are here
         if 'node_id' not in d:



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