Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
juga
sbws
Commits
ce4ad675
Commit
ce4ad675
authored
May 17, 2020
by
juga
Browse files
fix: v3bwfile: cap is never None
parent
f365d679
Changes
1
Hide whitespace changes
Inline
Side-by-side
sbws/lib/v3bwfile.py
View file @
ce4ad675
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment