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

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Oct 11 21:42:46 UTC 2014


#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


More information about the tor-bugs mailing list