aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@tuxion.com> 2015-12-25 06:36:33 -0500
committerGravatar Jon Bernard <jbernard@tuxion.com> 2015-12-28 14:15:15 -0500
commitc8c4b42b009897c31310960984819ca7a95a2429 (patch)
treef5d6eaa0bea989df944ec41a0cf7cf9074a0188c
parent6bfa15e3f66b62b0de0c09f701a8709e1f74c4a7 (diff)
downloaddotfiles-c8c4b42b009897c31310960984819ca7a95a2429.tar.gz
dotfiles-c8c4b42b009897c31310960984819ca7a95a2429.tar.bz2
dotfiles-c8c4b42b009897c31310960984819ca7a95a2429.zip
Expand configuration file path early
-rw-r--r--dotfiles/cli.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/dotfiles/cli.py b/dotfiles/cli.py
index 1ea86bf..19bf234 100644
--- a/dotfiles/cli.py
+++ b/dotfiles/cli.py
@@ -149,7 +149,7 @@ def parse_args():
def parse_config(config_file):
parser = configparser.SafeConfigParser()
- parser.read(os.path.expanduser(config_file))
+ parser.read(config_file)
opts = dict()
@@ -222,7 +222,8 @@ def main():
repo_settings['homedir'] = realpath_expanduser(
cli_opts.homedir or repo_settings['homedir'])
- config_opts = parse_config(cli_opts.config_file or '~/%s' % CONFIG_FILE)
+ config_opts = parse_config(cli_opts.config_file or
+ realpath_expanduser('~/%s' % CONFIG_FILE))
repo_settings['path'] = realpath_expanduser(
cli_opts.repository or