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

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



commit 99f3aea100f0be1a45e2bc1d3872f04dae4028f8
Author: juga0 <juga@xxxxxxxxxx>
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
 
 



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