[tor-commits] [nyx/master] Don't report msg and dedup config as being unused

atagar at torproject.org atagar at torproject.org
Sun Feb 14 02:55:49 UTC 2016


commit 744281151537b246a2ff86a9e5e08b1259bb32ba
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Feb 6 14:32:03 2016 -0800

    Don't report msg and dedup config as being unused
    
    Our msg.* and dedup.* config entries are used on-demand so they're indeed
    unused when we check but shouldn't report about them.
---
 nyx/controller.py | 5 +++--
 nyx/starter.py    | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/nyx/controller.py b/nyx/controller.py
index aa6da8c..cfd40e8 100644
--- a/nyx/controller.py
+++ b/nyx/controller.py
@@ -496,8 +496,9 @@ def start_nyx(stdscr):
 
   # provides notice about any unused config keys
 
-  for key in conf.get_config('nyx').unused_keys():
-    log.notice('Unused configuration entry: %s' % key)
+  for key in sorted(conf.get_config('nyx').unused_keys()):
+    if not key.startswith('msg.') and not key.startswith('dedup.'):
+      log.notice('Unused configuration entry: %s' % key)
 
   # tells daemon panels to start
 
diff --git a/nyx/starter.py b/nyx/starter.py
index 597a1c2..6084d04 100644
--- a/nyx/starter.py
+++ b/nyx/starter.py
@@ -222,7 +222,7 @@ def _clear_password(config):
   Without direct memory access this is about the best we can do to clear it.
   """
 
-  config.set('tor.password', '')
+  config.set('tor.password', None)
 
 
 def _use_english_subcommands():





More information about the tor-commits mailing list