diff --git a/beets/__init__.py b/beets/__init__.py index 20075073c..e3e5fdf83 100644 --- a/beets/__init__.py +++ b/beets/__init__.py @@ -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 ' @@ -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__) diff --git a/docs/changelog.rst b/docs/changelog.rst index 97cc7ca12..9a4ad0988 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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: