diff --git a/docs/changelog.rst b/docs/changelog.rst index a692bb0c..775b2c48 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -31,6 +31,10 @@ Feature release. release, like Mopidy 0.18, or migrate the configuration to the new format by hand. +**Configuration** + +- Fix proper decoding of exception messages that depends on the user's locale. + **Extension support** - Removed the :class:`~mopidy.ext.Extension` methods that were deprecated in diff --git a/mopidy/__main__.py b/mopidy/__main__.py index 5e7f2045..9620b936 100644 --- a/mopidy/__main__.py +++ b/mopidy/__main__.py @@ -26,7 +26,7 @@ sys.argv[1:] = [] from mopidy import commands, config as config_lib, ext -from mopidy.utils import log, path, process, versioning +from mopidy.utils import encoding, log, path, process, versioning logger = logging.getLogger(__name__) @@ -149,9 +149,10 @@ def create_file_structures_and_config(args, extensions): default = config_lib.format_initial(extensions) path.get_or_create_file(config_file, mkdir=False, content=default) logger.info('Initialized %s with default config', config_file) - except IOError as e: - logger.warning('Unable to initialize %s with default config: %s', - config_file, e) + except IOError as error: + logger.warning( + 'Unable to initialize %s with default config: %s', + config_file, encoding.locale_decode(error)) def check_old_locations():