From cb17033279fb1cc288c9dba98e38e624d28035c7 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Thu, 7 Sep 2017 10:00:56 -0400 Subject: [PATCH] config: Only try to load the default config file if it exists. --- oxrlib/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oxrlib/config.py b/oxrlib/config.py index 00f6eb3..c71c6cd 100644 --- a/oxrlib/config.py +++ b/oxrlib/config.py @@ -35,7 +35,9 @@ class Configuration: self.args = argparser.parse_args(arglist) if self.args.config_file is None: - self.args.config_file = [self.DEFAULT_CONFIG_PATH] + self.args.config_file = [] + if self.DEFAULT_CONFIG_PATH.exists(): + self.args.config_file.append(self.DEFAULT_CONFIG_PATH) self.conffile = self._build_conffile() conffile_paths = [path.as_posix() for path in self.args.config_file] read_files = self.conffile.read(conffile_paths)