[tor-commits] [nyx/master] Config options mistakenly reported as unused

atagar at torproject.org atagar at torproject.org
Wed Oct 28 00:32:31 UTC 2020


commit 67fb8ef429b52a5c878a79484ae5b1b316643476
Author: Damian Johnson <atagar at torproject.org>
Date:   Tue Oct 27 17:31:26 2020 -0700

    Config options mistakenly reported as unused
    
    Oops, these config options were used after the 'warn if unused' check...
    
      https://github.com/torproject/nyx/issues/32
---
 nyx/starter.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/nyx/starter.py b/nyx/starter.py
index 4b0d279..be904fd 100644
--- a/nyx/starter.py
+++ b/nyx/starter.py
@@ -109,11 +109,13 @@ def main(config):
 
     stem.util.log.trace(TORRC.format(torrc_path = torrc_path, torrc_content = torrc_content))
 
+  use_acs = config.get('acs_support', True)
+
   _warn_if_root(controller)
   _warn_if_unable_to_get_pid(controller)
-  _warn_about_unused_config_keys()
   _use_unicode()
   _set_process_name()
+  _warn_about_unused_config_keys()
 
   # These os.putenv calls fail on FreeBSD, and even attempting causes python to
   # print the following to stdout...
@@ -125,7 +127,7 @@ def main(config):
     os.putenv('ESCDELAY', '0')  # make 'esc' take effect right away
 
   try:
-    nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
+    nyx.curses.start(nyx.draw_loop, acs_support = use_acs, transparent_background = True, cursor = False)
   except KeyboardInterrupt:
     pass  # skip printing a stack trace
   finally:



More information about the tor-commits mailing list