[tor-commits] [nyx/master] Crashed if event popup not provided with any input

atagar at torproject.org atagar at torproject.org
Mon Apr 18 20:23:16 UTC 2016


commit 80be479323ab50ec1d764a26bc2cecfd9c236c1b
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Apr 17 13:10:32 2016 -0700

    Crashed if event popup not provided with any input
    
    Didn't account for the None value when this dialog is canceled...
    
      File "./run_nyx", line 8, in <module>
        nyx.main()
      File "/home/atagar/Desktop/nyx/nyx/__init__.py", line 60, 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 89, in main
        nyx.curses.start(nyx.controller.start_nyx, transparent_background = True, cursor = False)
      File "/home/atagar/Desktop/nyx/nyx/curses.py", line 190, in start
        curses.wrapper(_wrapper)
      File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
        return func(stdscr, *args, **kwds)
      File "/home/atagar/Desktop/nyx/nyx/curses.py", line 188, in _wrapper
        function()
      File "/home/atagar/Desktop/nyx/nyx/controller.py", line 370, in start_nyx
        keybinding.handle(key)
      File "/home/atagar/Desktop/nyx/nyx/panel/__init__.py", line 81, in handle
        self._action()
      File "/home/atagar/Desktop/nyx/nyx/panel/log.py", line 147, in show_event_selection_prompt
        self._event_types = nyx.log.listen_for_events(self._register_tor_event, event_types)
      File "/home/atagar/Desktop/nyx/nyx/log.py", line 178, in listen_for_events
        events = set(events)  # drops duplicates
      TypeError: 'NoneType' object is not iterable
---
 nyx/panel/log.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nyx/panel/log.py b/nyx/panel/log.py
index a18b2ce..cc8183b 100644
--- a/nyx/panel/log.py
+++ b/nyx/panel/log.py
@@ -143,7 +143,7 @@ class LogPanel(nyx.panel.Panel, threading.Thread):
 
     event_types = nyx.popups.select_event_types()
 
-    if event_types != self._event_types:
+    if event_types and event_types != self._event_types:
       self._event_types = nyx.log.listen_for_events(self._register_tor_event, event_types)
       self.redraw(True)
 





More information about the tor-commits mailing list