[tor-commits] [sbws/master] Replace conf['paths'] by conf.getpath('paths')

pastly at torproject.org pastly at torproject.org
Thu Aug 9 14:21:20 UTC 2018


commit 2c4cef012b2f9f0ecee1c15f5a9f7bffaaa3165a
Author: juga0 <juga at riseup.net>
Date:   Tue Jul 24 17:24:52 2018 +0000

    Replace conf['paths'] by conf.getpath('paths')
---
 sbws/lib/resultdump.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sbws/lib/resultdump.py b/sbws/lib/resultdump.py
index 2e51be9..c5d88d3 100644
--- a/sbws/lib/resultdump.py
+++ b/sbws/lib/resultdump.py
@@ -491,11 +491,11 @@ class ResultDump:
     ''' Runs the enter() method in a new thread and collects new Results on its
     queue. Writes them to daily result files in the data directory '''
     def __init__(self, args, conf, end_event):
-        assert os.path.isdir(conf['paths']['datadir'])
+        assert os.path.isdir(conf.getpath('paths', 'datadir'))
         assert isinstance(end_event, Event)
         self.conf = conf
         self.fresh_days = conf.getint('general', 'data_period')
-        self.datadir = conf['paths']['datadir']
+        self.datadir = conf.getpath('paths', 'datadir')
         self.end_event = end_event
         self.data = {}
         self.data_lock = RLock()





More information about the tor-commits mailing list