commit 4589cae7e9a56919dbb2ffdf3f3f4c0517d741f9 Author: Damian Johnson atagar@torproject.org Date: Thu Mar 10 09:45:34 2016 -0800
shutdown_daemons() confused controller types
There's a tor controller and curses controller. I recall merging a pull request around this and confusing the two is understandable. While working on something else I got the following so taking this opportunity to fix it...
Traceback (most recent call last): File "./run_nyx", line 8, in <module> nyx.main() File "/home/atagar/Desktop/nyx/nyx/__init__.py", line 26, in main nyx.starter.main() File "/home/atagar/Desktop/nyx/stem/util/conf.py", line 289, in wrapped return func(*args, config = config, **kwargs) File "/home/atagar/Desktop/nyx/nyx/starter.py", line 97, in main _shutdown_daemons(controller) File "/home/atagar/Desktop/nyx/nyx/starter.py", line 265, in _shutdown_daemons controller.quit() AttributeError: 'Controller' object has no attribute 'quit' --- nyx/starter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/nyx/starter.py b/nyx/starter.py index 81a892f..65a78d2 100644 --- a/nyx/starter.py +++ b/nyx/starter.py @@ -254,15 +254,15 @@ def _shutdown_daemons(controller): """
halt_threads = [nyx.util.tracker.stop_trackers()] - controller = nyx.controller.get_controller() + curses_controller = nyx.controller.get_controller()
- if controller: - halt_threads.append(controller.halt()) + if curses_controller: + halt_threads.append(curses_controller.halt())
for thread in halt_threads: thread.join()
- controller.quit() + controller.close()
if __name__ == '__main__':
tor-commits@lists.torproject.org