mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 03:54:21 +01:00
don't crash when config file is empty
This commit is contained in:
parent
6c1b49aadb
commit
d3a00ec443
2 changed files with 3 additions and 1 deletions
|
|
@ -633,7 +633,7 @@ class Configuration(RootView):
|
|||
for appdir in self._search_dirs():
|
||||
filename = os.path.join(appdir, CONFIG_FILENAME)
|
||||
if os.path.isfile(filename):
|
||||
yield ConfigSource(load_yaml(filename), filename)
|
||||
yield ConfigSource(load_yaml(filename) or {}, filename)
|
||||
|
||||
def _default_source(self):
|
||||
"""Return the default-value source for this program or `None` if
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ Changelog
|
|||
exiting with an exception. We also avoid an error when track metadata
|
||||
contains newlines.
|
||||
* Fix a crash when iTunes Sound Check tags contained invalid data.
|
||||
* Fix an error when the configuration file (``config.yaml``) is completely
|
||||
empty.
|
||||
|
||||
1.1b2 (February 16, 2013)
|
||||
-------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue