Fix existence check of config files

Signed-off-by: Gabor Mezei <[email protected]>
This commit is contained in:
Gabor Mezei
2024-12-05 09:58:20 +01:00
parent 7e4b36f2d7
commit 7cb68054bf
+4 -3
View File
@@ -228,9 +228,10 @@ class ConfigFile(metaclass=ABCMeta):
if os.path.lexists(candidate):
filename = candidate
break
else:
raise FileNotFoundError(f'{name} configuration file not found: '
f'{filename if filename else default_path}')
if not os.path.lexists(filename):
raise FileNotFoundError(f'{name} configuration file not found: '
f'{filename if filename else default_path}')
self.filename = filename
self.templates = []