def mutagen_call(action, path, func, *args, **kwargs):
 try:
  return func(*args, **kwargs)
 except mutagen.MutagenError as exc:
  log.debug(u'%s failed: %s', action, six.text_type(exc))
  raise UnreadableFileError(path, six.text_type(exc))
 except Exception as exc:
  log.debug(u'%s', traceback.format_exc())
  log.error(u'uncaught Mutagen exception in %s: %s', action, exc)
  raise MutagenError(path, exc)

def mutagen_call ( action , path , func , * args , ** kwargs ) : try : return func ( * args , ** kwargs ) except mutagen . MutagenError as exc : log . debug ( u'%s failed: %s' , action , six . text_type ( exc ) ) raise UnreadableFileError ( path , six . text_type ( exc ) ) except Exception as exc : log . debug ( u'%s' , traceback . format_exc ( ) ) log . error ( u'uncaught Mutagen exception in %s: %s' , action , exc ) raise MutagenError ( path , exc )
call a mutagen function with appropriate error handling .