commit d72fe2ee33237c507f461488c7bb879301895e62 Author: juga0 juga@riseup.net Date: Wed May 20 13:23:26 2020 +0000
fix: v3bwfile: Remove unneeded minimum 1
since rounding already returns 1 as minimum. --- sbws/lib/v3bwfile.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 4ebfa68..d64712c 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -1434,9 +1434,7 @@ class V3BWFile(object): for l in bw_lines_tf: bw_scaled = min(hlimit, l.bw) # round and convert to KB - bw_new = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig) - # avoid 0 - l.bw = max(bw_new, 1) + l.bw = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig) return sorted(bw_lines_tf, key=lambda x: x.bw, reverse=reverse)
@staticmethod
tor-commits@lists.torproject.org