[tor-commits] [nyx/master] Stacktrace when referring to data_directory()

atagar at torproject.org atagar at torproject.org
Sun Aug 27 19:39:47 UTC 2017

commit 542bf2f91562167a4eed79271bed0d1d4bbf40e1
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Aug 26 16:06:39 2017 -0700

    Stacktrace when referring to data_directory()
    Huh. Kinda unsure how this didn't come up earlier. Initializing the config
    panel is failing with...
      Traceback (most recent call last):
        File "/home/ubuntu/nyx/run_nyx", line 14, in <module>
        File "/home/ubuntu/nyx/nyx/__init__.py", line 105, in main
        File "/home/ubuntu/nyx/stem/util/conf.py", line 289, in wrapped
          return func(*args, config = config, **kwargs)
        File "/home/ubuntu/nyx/nyx/starter.py", line 104, in main
          nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False)
        File "/home/ubuntu/nyx/nyx/curses.py", line 216, in start
        File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
          return func(stdscr, *args, **kwds)
        File "/home/ubuntu/nyx/nyx/curses.py", line 214, in _wrapper
        File "/home/ubuntu/nyx/nyx/__init__.py", line 123, in draw_loop
          interface = nyx_interface()
        File "/home/ubuntu/nyx/nyx/__init__.py", line 176, in nyx_interface
          Interface()  # constructor sets NYX_INTERFACE
        File "/home/ubuntu/nyx/nyx/__init__.py", line 345, in __init__
        File "/home/ubuntu/nyx/nyx/panel/config.py", line 133, in __init__
          cached_manual_path = data_directory('manual')
        File "/home/ubuntu/nyx/stem/util/conf.py", line 289, in wrapped
          return func(*args, config = config, **kwargs)
      TypeError: data_directory() got multiple values for keyword argument 'config'
 nyx/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nyx/__init__.py b/nyx/__init__.py
index 5cd0898..3cf3c85 100644
--- a/nyx/__init__.py
+++ b/nyx/__init__.py
@@ -232,7 +232,7 @@ def init_controller(*args, **kwargs):
-def data_directory(config, filename):
+def data_directory(filename, config):
   path = config.get('data_directory', '~/.nyx')
   if path == 'disabled':

More information about the tor-commits mailing list