Skip to content

Commit

Permalink
Expand user home and env vars in config_file path
Browse files Browse the repository at this point in the history
Closes #318.
  • Loading branch information
randomir committed Jun 19, 2020
1 parent 7148aa4 commit a122a34
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dwave/cloud/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ def load_config_from_files(filenames=None):
config = configparser.ConfigParser(default_section="defaults")
for filename in filenames:
try:
filename = os.path.expandvars(os.path.expanduser(filename))
with open(filename, 'r') as f:
config.read_file(f, filename)
except (IOError, OSError):
Expand Down

0 comments on commit a122a34

Please sign in to comment.