commit 1225c5d9ea738723e272288d6734dbc651cf2d7b Author: juga0 juga@riseup.net Date: Sun Mar 22 07:09:19 2020 +0000
fix: v3bwfile: Stop calculating failures with 0 attempts --- sbws/lib/v3bwfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py index 6465892..245ffa6 100644 --- a/sbws/lib/v3bwfile.py +++ b/sbws/lib/v3bwfile.py @@ -379,7 +379,8 @@ class V3BWHeader(object): # failures = attempts - all mesaurements # Works only in the case that old measurements files already had # measurements count - if recent_measurement_attempt_count is not None: + # If this is None or 0, the failures can't be calculated + if recent_measurement_attempt_count: all_measurements = 0 for result_list in results.values(): all_measurements += len(result_list)
tor-commits@lists.torproject.org