files.append(local_xdg)
if os.path.exists(local):
files.append(local)
- if os.path.exists(file):
- files.append(file)
+
+ files.append(file)
+ if not os.path.exists(file):
+ raise ConfigException(f'"{file}": No such file or directory') from None
for f in files:
exec(Path(str(f)).read_text(), {}, config)