Raising error on missing configuration file inclusion

This commit is contained in:
Adam Jakab 2020-02-23 23:29:15 +01:00
parent bc53695f24
commit d2e32a6b20

View file

@ -35,6 +35,8 @@ class IncludeLazyConfig(confuse.LazyConfig):
filename = view.as_filename()
if os.path.isfile(filename):
self.set_file(filename)
else:
raise FileNotFoundError("Warning! Configuration file({0}) does not exist!".format(filename))
except confuse.NotFoundError:
pass