mirror of
https://github.com/beetbox/beets.git
synced 2026-01-06 07:53:40 +01:00
displayable_path() wrap for config path logging
This commit is contained in:
parent
4a1e8fdd6e
commit
dfb0eff8e3
3 changed files with 7 additions and 3 deletions
|
|
@ -702,9 +702,9 @@ def main(args=None, configfh=None):
|
|||
log.setLevel(logging.DEBUG)
|
||||
else:
|
||||
log.setLevel(logging.INFO)
|
||||
log.debug(u'config file: %s' % configpath)
|
||||
log.debug(u'library database: %s' % lib.path)
|
||||
log.debug(u'library directory: %s' % lib.directory)
|
||||
log.debug(u'config file: %s' % util.displayable_path(configpath))
|
||||
log.debug(u'library database: %s' % util.displayable_path(lib.path))
|
||||
log.debug(u'library directory: %s' % util.displayable_path(lib.directory))
|
||||
|
||||
# Invoke the subcommand.
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -171,6 +171,9 @@ def displayable_path(path):
|
|||
"""
|
||||
if isinstance(path, unicode):
|
||||
return path
|
||||
elif not isinstance(path, str):
|
||||
# A non-string object: just get its unicode representation.
|
||||
return unicode(path)
|
||||
|
||||
encoding = sys.getfilesystemencoding() or sys.getdefaultencoding()
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ Changelog
|
|||
a single field.
|
||||
* Fix a crash with non-ASCII characters in bytestring metadata fields (e.g.,
|
||||
MusicBrainz IDs).
|
||||
* Fix another crash with non-ASCII characters in the configuration paths.
|
||||
|
||||
|
||||
1.0b12 (January 16, 2012)
|
||||
|
|
|
|||
Loading…
Reference in a new issue