mirror of
https://github.com/beetbox/beets.git
synced 2025-12-14 20:43:41 +01:00
Merge pull request #3498 from adamjakab/dev-cfg-inc
Raising error on missing configuration file inclusion
This commit is contained in:
commit
69c3ba4b8d
2 changed files with 7 additions and 5 deletions
|
|
@ -15,9 +15,8 @@
|
|||
|
||||
from __future__ import division, absolute_import, print_function
|
||||
|
||||
import os
|
||||
|
||||
import confuse
|
||||
from sys import stderr
|
||||
|
||||
__version__ = u'1.5.0'
|
||||
__author__ = u'Adrian Sampson <adrian@radbox.org>'
|
||||
|
|
@ -32,11 +31,12 @@ class IncludeLazyConfig(confuse.LazyConfig):
|
|||
|
||||
try:
|
||||
for view in self['include']:
|
||||
filename = view.as_filename()
|
||||
if os.path.isfile(filename):
|
||||
self.set_file(filename)
|
||||
self.set_file(view.as_filename())
|
||||
except confuse.NotFoundError:
|
||||
pass
|
||||
except confuse.ConfigReadError as err:
|
||||
stderr.write("configuration `import` failed: {}"
|
||||
.format(err.reason))
|
||||
|
||||
|
||||
config = IncludeLazyConfig('beets', __name__)
|
||||
|
|
|
|||
|
|
@ -160,6 +160,8 @@ Fixes:
|
|||
:bug:`3480`
|
||||
* :doc:`/plugins/parentwork`: Don't save tracks when nothing has changed.
|
||||
:bug:`3492`
|
||||
* Added a warning when configuration files defined in the `include` directive
|
||||
of the configuration file fail to be imported.
|
||||
|
||||
For plugin developers:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue