[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [sbws/master] Stop comparing min_num results with ">", it's ">="
commit c6ba10cdaea4c7a8c228b2d1c09459a1afff849d
Author: juga0 <juga@xxxxxxxxxx>
Date: Mon Oct 15 10:14:58 2018 +0000
Stop comparing min_num results with ">", it's ">="
and do not use classmethod for it, since it is only a comparison
---
sbws/lib/v3bwfile.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py
index 0bbead1..3764714 100644
--- a/sbws/lib/v3bwfile.py
+++ b/sbws/lib/v3bwfile.py
@@ -275,9 +275,9 @@ class V3BWLine(object):
kwargs.update(cls.result_types_from_results(results))
# useful args for scaling
if success_results:
- min_num_success_results = cls.min_num_results(success_results,
- min_num)
- if not min_num_success_results:
+ if not len(success_results) >= min_num:
+ log.debug('There are no results with relays that have at least'
+ '{} results.'.format(min_num))
return None
results_away = \
cls.results_away_each_other(min_num_success_results, secs_away)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits