Skip to content

Commit

Permalink
config: allow using tilde ~ to specify config paths
Browse files Browse the repository at this point in the history
This allows abstracting away the paths and seamlessly allowing
per-user configurations.

Signed-off-by: David Caro <david@dcaro.es>
Change-Id: Ic44875a61f1e6463dc5452832a94d8466372af08
  • Loading branch information
david-caro committed Jan 25, 2021
1 parent 670dc5a commit 2683afe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cumin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def parse_config(config_file):
"""
try:
with open(config_file, 'r') as f:
with open(os.path.expanduser(config_file), 'r') as f:
config = yaml.safe_load(f)
except IOError as e:
raise CuminError('Unable to read configuration file: {message}'.format(message=e))
Expand Down

0 comments on commit 2683afe

Please sign in to comment.