commit 619c2f46d93c1171e9d9a0a32a9a76648e8df901 Author: juga0 juga@riseup.net Date: Sat Dec 1 16:50:36 2018 +0000
v3bwfile: do not round twice in torflow's scale method --- sbws/lib/v3bwfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 1cf7b63..55f63ec 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -868,8 +868,8 @@ class V3BWFile(object): # Cap maximum bw if cap is not None: bw_new = min(hlimit, bw_new) - # remove decimals and avoid 0 - l.bw = max(round(bw_new), 1) + # avoid 0 + l.bw = max(bw_new, 1) return sorted(bw_lines_tf, key=lambda x: x.bw, reverse=reverse)
@staticmethod
tor-commits@lists.torproject.org