[tor-commits] [nyx/master] Drop unused get_data_directory()
atagar at torproject.org
atagar at torproject.org
Mon Feb 15 14:45:09 UTC 2016
commit 57a3e6ef083da10db12d0f12d9580e4e1991ef1a
Author: Damian Johnson <atagar at torproject.org>
Date: Wed Feb 10 11:28:55 2016 -0800
Drop unused get_data_directory()
Method is unused. If it wasnn't then our util's DATA_DIR is the thing to use.
---
nyx/controller.py | 19 +------------------
nyx/log_panel.py | 5 +----
2 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/nyx/controller.py b/nyx/controller.py
index cfd40e8..a5f82a1 100644
--- a/nyx/controller.py
+++ b/nyx/controller.py
@@ -22,10 +22,10 @@ import nyx.util.tracker
import stem
from stem.control import State
+from stem.util import conf, log
from nyx.util import panel, tor_controller, ui_tools
-from stem.util import conf, log
NYX_CONTROLLER = None
@@ -39,7 +39,6 @@ def conf_handler(key, value):
CONFIG = conf.config_dict('nyx', {
'startup.events': 'N3',
- 'startup.data_directory': '~/.nyx',
'features.acsSupport': True,
'features.panels.show.graph': True,
'features.panels.show.log': True,
@@ -422,22 +421,6 @@ class Controller:
else:
self._force_redraw = True
- def get_data_directory(self):
- """
- Provides the path where nyx's resources are being placed. The path ends
- with a slash and is created if it doesn't already exist.
- """
-
- data_dir = os.path.expanduser(CONFIG['startup.data_directory'])
-
- if not data_dir.endswith('/'):
- data_dir += '/'
-
- if not os.path.exists(data_dir):
- os.makedirs(data_dir)
-
- return data_dir
-
def quit(self):
self.quit_signal = True
diff --git a/nyx/log_panel.py b/nyx/log_panel.py
index 4fdb8ad..37e9e21 100644
--- a/nyx/log_panel.py
+++ b/nyx/log_panel.py
@@ -20,9 +20,7 @@ from stem.util import conf, log
def conf_handler(key, value):
- if key == 'features.log.maxLineWrap':
- return max(1, value)
- elif key == 'features.log.prepopulateReadLimit':
+ if key == 'features.log.prepopulateReadLimit':
return max(0, value)
elif key == 'features.log.maxRefreshRate':
return max(10, value)
@@ -33,7 +31,6 @@ def conf_handler(key, value):
CONFIG = conf.config_dict('nyx', {
'features.logFile': '',
'features.log.showDuplicateEntries': False,
- 'features.log.maxLineWrap': 6,
'features.log.prepopulate': True,
'features.log.prepopulateReadLimit': 5000,
'features.log.maxRefreshRate': 300,
More information about the tor-commits
mailing list