[tor-commits] [sbws/master] Expand paths strings to fs dirs

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


commit 99f3aea100f0be1a45e2bc1d3872f04dae4028f8
Author: juga0 <juga at riseup.net>
Date:   Mon Jul 23 22:39:09 2018 +0000

    Expand paths strings to fs dirs
---
 sbws/util/config.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sbws/util/config.py b/sbws/util/config.py
index 61a0e61..ee7bde7 100644
--- a/sbws/util/config.py
+++ b/sbws/util/config.py
@@ -81,6 +81,10 @@ def get_config(args):
     conf = _get_default_config()
     conf = _get_default_logging_config(conf=conf)
     conf = _get_user_config(args, conf=conf)
+    # it is only needed to expand user and vars to have the rest of the
+    # paths correctly expanded too
+    conf['paths']['sbws_home'] = os.path.expanduser(os.path.expandvars(
+        conf['paths']['sbws_home']))
     return conf
 
 





More information about the tor-commits mailing list