diff --git a/src/main.py b/src/main.py index b41061c..27d9944 100755 --- a/src/main.py +++ b/src/main.py @@ -116,7 +116,13 @@ def config_parser_has_option(config, profile, option): def get_default_path(filename): - paths = (".", os.environ["HOME"], "/root", "/") + # Add home path locations + path_home = os.environ["HOME"] + path_config = os.path.join(path_home, ".config") + path_config_cred = os.path.join(path_config, "credentials") + + # Return first configuration path in list + paths = (".", path_home, path_config, path_config_cred, "/root", "/") for path in paths: full_path = os.path.join(path, filename) if os.path.isfile(full_path):