mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
MediaFile: Use stock logging
This is part of the effort to separate MediaFile from beets (#1966). It avoids using the beets-specific logging infrastructure. This commit is part of fdebab657d6e85de56b3996e8fdece09796940ae from the new MediaFile repository.
This commit is contained in:
parent
cf5fa501e2
commit
692dea39e8
1 changed files with 5 additions and 5 deletions
|
|
@ -64,7 +64,7 @@ import six
|
|||
|
||||
__all__ = ['UnreadableFileError', 'FileTypeError', 'MediaFile']
|
||||
|
||||
log = logging.getLogger('beets')
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
# Human-readable type names.
|
||||
TYPES = {
|
||||
|
|
@ -134,12 +134,12 @@ def mutagen_call(action, path, func, *args, **kwargs):
|
|||
try:
|
||||
return func(*args, **kwargs)
|
||||
except mutagen.MutagenError as exc:
|
||||
log.debug(u'{} failed: {}', action, six.text_type(exc))
|
||||
log.debug(u'%s failed: %s', action, six.text_type(exc))
|
||||
raise UnreadableFileError(path)
|
||||
except Exception as exc:
|
||||
# Isolate bugs in Mutagen.
|
||||
log.debug(u'{}', traceback.format_exc())
|
||||
log.error(u'uncaught Mutagen exception in {}: {}', action, exc)
|
||||
log.debug(u'%s', traceback.format_exc())
|
||||
log.error(u'uncaught Mutagen exception in %s: %s', action, exc)
|
||||
raise MutagenError(path, exc)
|
||||
|
||||
|
||||
|
|
@ -405,7 +405,7 @@ class Image(object):
|
|||
try:
|
||||
type = list(ImageType)[type]
|
||||
except IndexError:
|
||||
log.debug(u"ignoring unknown image type index {0}", type)
|
||||
log.debug(u"ignoring unknown image type index %s", type)
|
||||
type = ImageType.other
|
||||
self.type = type
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue