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

[tor-commits] [sbws/maint-1.1] chg: v3bwfile: Stop making mean minimum 1



commit 88eb7ef53c77d1d377125effd088f4cd41f59235
Author: juga0 <juga@xxxxxxxxxx>
Date:   Tue May 19 07:59:28 2020 +0000

    chg: v3bwfile: Stop making mean minimum 1
---
 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 9a303be..8c5b9a9 100644
--- a/sbws/lib/v3bwfile.py
+++ b/sbws/lib/v3bwfile.py
@@ -902,7 +902,8 @@ class V3BWLine(object):
             if r.relay_observed_bandwidth is not None:
                 desc_bw_obs_ls.append(r.relay_observed_bandwidth)
         if desc_bw_obs_ls:
-            return max(round(mean(desc_bw_obs_ls)), 1)
+            return round(mean(desc_bw_obs_ls))
+        log.warning("Descriptor observed bandwidth is None.")
         return None
 
     @staticmethod



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