[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 9677357d73a37e8ad67a701784ddde05d8b46ff6
Author: juga0 <juga at riseup.net>
Date:   Tue Jul 24 17:16:14 2018 +0000

    Replace conf['paths'] by conf.getpath('paths')
---
 sbws/sbws.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sbws/sbws.py b/sbws/sbws.py
index 6481df6..6f8752c 100644
--- a/sbws/sbws.py
+++ b/sbws/sbws.py
@@ -21,9 +21,9 @@ def _ensure_dirs(conf):
     log.debug('Ensuring all dirs exists.')
     # it is not needed to check sbws_home dir, since the following
     # will create parent dirs too (in case they don't exist)
-    os.makedirs(conf['paths']['datadir'], exist_ok=True)
-    os.makedirs(conf['paths']['v3bw_dname'], exist_ok=True)
-    os.makedirs(conf['paths']['log_dname'], exist_ok=True)
+    os.makedirs(conf.getpath('paths', 'datadir'), exist_ok=True)
+    os.makedirs(conf.getpath('paths', 'v3bw_dname'), exist_ok=True)
+    os.makedirs(conf.getpath('paths', 'log_dname'), exist_ok=True)
 
 
 def _adjust_log_level(args, conf):





More information about the tor-commits mailing list