[tor-commits] [arm/master] Bandwidth stats failed with a stacktrace if we're missing our own descriptor

atagar at torproject.org atagar at torproject.org
Mon Jun 30 00:09:39 UTC 2014


commit bad52b6394d0651ac7131f9e807e7c362b03eaf9
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Jun 29 15:13:50 2014 -0700

    Bandwidth stats failed with a stacktrace if we're missing our own descriptor
    
    Traceback (most recent call last):
      File "./run_arm", line 47, in <module>
        main()
      File "./run_arm", line 16, in main
        arm.starter.main()
      File "/usr/lib/python2.7/stem/util/conf.py", line 288, in wrapped
        return func(*args, config = config, **kwargs)
      File "/home/atagar/Desktop/arm/arm/starter.py", line 92, in main
        curses.wrapper(arm.controller.start_arm)
      File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
        return func(stdscr, *args, **kwds)
      File "/home/atagar/Desktop/arm/arm/controller.py", line 589, in start_arm
        init_controller(stdscr, CONFIG['start_time'])
      File "/home/atagar/Desktop/arm/arm/controller.py", line 183, in init_controller
        bw_stats = arm.graphing.bandwidth_stats.BandwidthStats()
      File "/home/atagar/Desktop/arm/arm/graphing/bandwidth_stats.py", line 72, in __init__
        self.reset_listener(controller, State.INIT, None)  # initializes values
      File "/home/atagar/Desktop/arm/arm/graphing/bandwidth_stats.py", line 114, in reset_listener
        self.new_desc_event(None)  # updates title params
      File "/home/atagar/Desktop/arm/arm/graphing/bandwidth_stats.py", line 417, in new_desc_event
        bw_measured = get_my_bandwidth_measured(controller)
      File "/home/atagar/Desktop/arm/arm/graphing/bandwidth_stats.py", line 595, in get_my_bandwidth_measured
        my_status_entry = controller.get_network_status(my_fingerprint)
      File "/usr/lib/python2.7/stem/control.py", line 1529, in get_network_status
        raise exc
    stem.InvalidArguments: GETINFO request contained unrecognized keywords: ns/id/1A94D1A794FCB2F8B6CBC179EF8FDD4008A98D3B
---
 arm/graphing/bandwidth_stats.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arm/graphing/bandwidth_stats.py b/arm/graphing/bandwidth_stats.py
index b781d3e..1fffa4a 100644
--- a/arm/graphing/bandwidth_stats.py
+++ b/arm/graphing/bandwidth_stats.py
@@ -567,7 +567,7 @@ def get_my_bandwidth_observed(controller):
   my_fingerprint = controller.get_info("fingerprint", None)
 
   if my_fingerprint:
-    my_descriptor = controller.get_server_descriptor(my_fingerprint)
+    my_descriptor = controller.get_server_descriptor(my_fingerprint, None)
 
     if my_descriptor:
       return my_descriptor.observed_bandwidth
@@ -592,7 +592,7 @@ def get_my_bandwidth_measured(controller):
   my_fingerprint = controller.get_info("fingerprint", None)
 
   if my_fingerprint:
-    my_status_entry = controller.get_network_status(my_fingerprint)
+    my_status_entry = controller.get_network_status(my_fingerprint, None)
 
     if my_status_entry and hasattr(my_status_entry, 'bandwidth'):
       return my_status_entry.bandwidth





More information about the tor-commits mailing list