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

Re: [tor-bugs] #13390 [DocTor]: If there are no bandwidth authorities, doctor crashes



#13390: If there are no bandwidth authorities, doctor crashes
------------------------+--------------------
     Reporter:  tom     |      Owner:  atagar
         Type:  defect  |     Status:  new
     Priority:  normal  |  Milestone:
    Component:  DocTor  |    Version:
   Resolution:          |   Keywords:
Actual Points:          |  Parent ID:
       Points:          |
------------------------+--------------------

Comment (by tom):

 Fixing this may be as simple as:

 {{{
 @@ -636,6 +675,9 @@ def bandwidth_authorities_in_sync(latest_consensus,
 consensuses, votes):
      if measured:
        measurement_counts[authority] = len(measured)

 +  if not measurement_counts:
 +    return
 +
    average = sum(measurement_counts.values()) / len(measurement_counts)

    for authority, count in measurement_counts.items():
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13390#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs