From a122a34b3828576e098528f0faf2643e15b780da Mon Sep 17 00:00:00 2001 From: Radomir Stevanovic Date: Fri, 19 Jun 2020 05:06:07 -0700 Subject: [PATCH] Expand user home and env vars in config_file path Closes #318. --- dwave/cloud/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dwave/cloud/config.py b/dwave/cloud/config.py index 9067215f..87971a4d 100644 --- a/dwave/cloud/config.py +++ b/dwave/cloud/config.py @@ -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):