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

[tor-commits] [sbws/maint-1.1] fix: v3bwfile: cap is never None



commit ce4ad67508003e5437a10aef8f642e0f559dc54f
Author: juga0 <juga@xxxxxxxxxx>
Date:   Sun May 17 11:35:37 2020 +0000

    fix: v3bwfile: cap is never None
---
 sbws/lib/v3bwfile.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py
index 8c58d64..e7a8aef 100644
--- a/sbws/lib/v3bwfile.py
+++ b/sbws/lib/v3bwfile.py
@@ -1398,8 +1398,7 @@ class V3BWFile(object):
             # round and convert to KB
             bw_new = kb_round_x_sig_dig(bw_scaled, digits=num_round_dig)
             # Cap maximum bw
-            if cap is not None:
-                bw_new = min(hlimit, bw_new)
+            bw_new = min(hlimit, bw_new)
             # avoid 0
             l.bw = max(bw_new, 1)
         return sorted(bw_lines_tf, key=lambda x: x.bw, reverse=reverse)



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