Merge pull request #1255 from jodal/feature/file-logging-levels

file: Adjust file/media_dirs failure logging
This commit is contained in:
Thomas Adamcik 2015-08-15 23:56:31 +02:00
commit 2b0756e724
2 changed files with 19 additions and 4 deletions

View File

@ -4,6 +4,18 @@ Changelog
This changelog is used to track all major changes to Mopidy.
v1.1.1 (UNRELEASED)
===================
Bug fix release.
- File: Adjust log levels when failing to expand ``$XDG_MUSIC_DIR`` into a real
path. This usually happens when running Mopidy as a system service, and thus
with a limited set of environment variables. (Fixes: :issue:`1249`, PR:
:issue:`1255`)
v1.1.0 (2015-08-09)
===================

View File

@ -108,12 +108,15 @@ class FileLibraryProvider(backend.LibraryProvider):
media_dir_split[0].encode(FS_ENCODING))
if not local_path:
logger.warning('Failed expanding path (%s) from '
'file/media_dirs config value.',
media_dir_split[0])
logger.debug(
'Failed expanding path (%s) from file/media_dirs config '
'value.',
media_dir_split[0])
continue
elif not os.path.isdir(local_path):
logger.warning('%s is not a directory', local_path)
logger.warning(
'%s is not a directory. Please create the directory or '
'update the file/media_dirs config value.', local_path)
continue
media_dir['path'] = local_path