[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 2c4cef012b2f9f0ecee1c15f5a9f7bffaaa3165a
Author: juga0 <juga@xxxxxxxxxx>
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()



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits