[tor-commits] [sbws/master] fixup! new: v3bwfile: Set measurements exclusion KeyValues

juga at torproject.org juga at torproject.org
Thu Mar 21 18:30:42 UTC 2019


commit 39739fa38acf91853f62e99234eaaf0b878783b8
Author: juga0 <juga at riseup.net>
Date:   Sun Mar 17 13:10:30 2019 +0000

    fixup! new: v3bwfile: Set measurements exclusion KeyValues
---
 sbws/lib/v3bwfile.py            | 5 +++--
 tests/unit/lib/test_v3bwfile.py | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py
index 245c75a..0a95510 100644
--- a/sbws/lib/v3bwfile.py
+++ b/sbws/lib/v3bwfile.py
@@ -561,9 +561,10 @@ class V3BWLine(object):
             len(results_away) - len(results_recent)
         if not results_recent:
             return None, 'recent_measurement_exclusion_not_recent_count'
-        kwargs['relay_recent_measurement_exclusion_not_min_num_count'] = \
-            len(results_recent)
+
         if not len(results_recent) >= min_num:
+            kwargs['relay_recent_measurement_exclusion_not_min_num_count'] = \
+                len(results_recent)
             # log.debug('The number of results is less than %s', min_num)
             return None, 'recent_measurement_exclusion_not_min_num_count'
 
diff --git a/tests/unit/lib/test_v3bwfile.py b/tests/unit/lib/test_v3bwfile.py
index 8c95a5e..022e070 100644
--- a/tests/unit/lib/test_v3bwfile.py
+++ b/tests/unit/lib/test_v3bwfile.py
@@ -65,7 +65,6 @@ raw_bwl_str = "bw=56 bw_mean=61423 bw_median=55656 "\
     "node_id=$AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA "\
     "relay_recent_measurement_attempt_count=2 "\
     "relay_recent_measurement_exclusion_not_distanciated_count=0 "\
-    "relay_recent_measurement_exclusion_not_min_num_count=1 "\
     "relay_recent_measurement_exclusion_not_recent_count=0 "\
     "relay_recent_measurement_exclusion_not_success_count=1 "\
     "relay_recent_priority_list_count=3 "\





More information about the tor-commits mailing list