mirror of
https://github.com/beetbox/beets.git
synced 2025-12-14 04:23:56 +01:00
Simple warning on missing (included) configuration file.
This commit is contained in:
parent
c90f7aacfc
commit
3db55c7bf4
1 changed files with 4 additions and 5 deletions
|
|
@ -33,13 +33,12 @@ class IncludeLazyConfig(confuse.LazyConfig):
|
|||
try:
|
||||
for view in self['include']:
|
||||
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))
|
||||
self.set_file(filename)
|
||||
except confuse.NotFoundError:
|
||||
pass
|
||||
except confuse.ConfigReadError as err:
|
||||
print("Warning! Missing configuration file! {}".format(err.reason))
|
||||
pass
|
||||
|
||||
|
||||
config = IncludeLazyConfig('beets', __name__)
|
||||
|
|
|
|||
Loading…
Reference in a new issue