GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit ce4ad675 authored by juga  's avatar juga 💬

fix: v3bwfile: cap is never None

parent f365d679
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment