[tor-commits] [arm/master] The start_time is a Stat attribute, not Category

atagar at torproject.org atagar at torproject.org
Sun Mar 15 22:40:19 UTC 2015


commit 1e55b1be10342ee22225fcf843f2d3b34154ed14
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Mar 15 15:37:44 2015 -0700

    The start_time is a Stat attribute, not Category
    
    On small screens we balked with...
    
      Traceback (most recent call last):
        File "./run_seth", line 47, in <module>
          main()
        File "./run_seth", line 16, in main
          seth.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/seth/seth/starter.py", line 92, in main
          curses.wrapper(seth.controller.start_seth)
        File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
          return func(stdscr, *args, **kwds)
        File "/home/atagar/Desktop/seth/seth/controller.py", line 570, in start_seth
          control.redraw(False)
        File "/home/atagar/Desktop/seth/seth/controller.py", line 401, in redraw
          panel_impl.redraw(force)
        File "/home/atagar/Desktop/seth/seth/util/panel.py", line 442, in redraw
          self.draw(self.max_x, self.max_y)
        File "/home/atagar/Desktop/seth/seth/graph_panel.py", line 641, in draw
          runtime = time.time() - param.start_time
      AttributeError: 'BandwidthStats' object has no attribute 'start_time'
---
 seth/graph_panel.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/seth/graph_panel.py b/seth/graph_panel.py
index 1e248a3..d3097e6 100644
--- a/seth/graph_panel.py
+++ b/seth/graph_panel.py
@@ -638,7 +638,7 @@ class GraphPanel(panel.Panel):
       self.addstr(labeling_line, 0, ' ' * width)
       graph_column = min((width - 10) / 2, CONFIG['features.graph.max_width'])
 
-      runtime = time.time() - param.start_time
+      runtime = time.time() - param.primary.start_time
       primary_footer = 'total: %s, avg: %s/sec' % (param._size_label(param.primary.total), param._size_label(param.primary.total / runtime))
       secondary_footer = 'total: %s, avg: %s/sec' % (param._size_label(param.secondary.total), param._size_label(param.secondary.total / runtime))
 



More information about the tor-commits mailing list