[tor-commits] [nyx/master] Whitespace breaks logged_events

atagar at torproject.org atagar at torproject.org
Wed Oct 28 00:15:46 UTC 2020


commit 1d5ecdf2d7aaf16a49b5e9ff3ebb2d35faac5c87
Author: Damian Johnson <atagar at torproject.org>
Date:   Tue Oct 27 17:14:04 2020 -0700

    Whitespace breaks logged_events
    
    When our logged_events has whitespace within it Nyx confusingly claims that the
    events are not recognized. Caught thanks to Sai...
    
      https://github.com/torproject/nyx/issues/31
---
 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 030be38..bbb1961 100644
--- a/nyx/panel/log.py
+++ b/nyx/panel/log.py
@@ -85,7 +85,7 @@ class LogPanel(nyx.panel.DaemonPanel):
   def __init__(self):
     nyx.panel.DaemonPanel.__init__(self, UPDATE_RATE)
 
-    logged_events = CONFIG['logged_events'].split(',')
+    logged_events = list(map(str.strip, CONFIG['logged_events'].split(',')))
 
     for alias, actual_event in EVENT_ALIASES.items():
       if alias in logged_events:



More information about the tor-commits mailing list