diff --git a/.gitignore b/.gitignore index 71ae7fb81..40e3e1a7e 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ *.project *.pydevproject *.ropeproject +*.orig # Project Specific patterns diff --git a/beets/mediafile.py b/beets/mediafile.py index 4e83d0543..e54fbd7cd 100644 --- a/beets/mediafile.py +++ b/beets/mediafile.py @@ -1261,7 +1261,7 @@ class MediaFile(object): except Exception as exc: # Isolate bugs in Mutagen. log.debug(traceback.format_exc()) - log.error('uncaught Mutagen exception in open: {0}'.format(exc)) + log.error(u'uncaught Mutagen exception in open: {0}'.format(exc)) raise MutagenError(path, exc) if self.mgfile is None: @@ -1328,7 +1328,7 @@ class MediaFile(object): raise except Exception as exc: log.debug(traceback.format_exc()) - log.error('uncaught Mutagen exception in save: {0}'.format(exc)) + log.error(u'uncaught Mutagen exception in save: {0}'.format(exc)) raise MutagenError(self.path, exc) def delete(self): diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py index b3d6cf13d..311fbc4e4 100644 --- a/beets/ui/__init__.py +++ b/beets/ui/__init__.py @@ -937,10 +937,8 @@ def _open_library(config): )) log.debug(u'library database: {0}\n' u'library directory: {1}' - .format( - util.displayable_path(lib.path), - util.displayable_path(lib.directory), - )) + .format(util.displayable_path(lib.path), + util.displayable_path(lib.directory))) return lib diff --git a/beets/ui/commands.py b/beets/ui/commands.py index bbf73d48d..6139ea58f 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -778,7 +778,7 @@ class TerminalImportSession(importer.ImportSession): that's already in the library. """ log.warn(u"This {0} is already in the library!" - .format("album" if task.is_album else "item")) + .format('album' if task.is_album else 'item')) if config['import']['quiet']: # In quiet mode, don't prompt -- just skip. @@ -1392,7 +1392,7 @@ def move_items(lib, dest, query, copy, album): action = 'Copying' if copy else 'Moving' entity = 'album' if album else 'item' - log.info('{0} {1} {2}s.'.format(action, len(objs), entity)) + log.info(u'{0} {1} {2}s.'.format(action, len(objs), entity)) for obj in objs: log.debug(u'moving: {0}'.format(util.displayable_path(obj.path))) diff --git a/beetsplug/info.py b/beetsplug/info.py index f7462761a..180f35747 100644 --- a/beetsplug/info.py +++ b/beetsplug/info.py @@ -52,7 +52,7 @@ def run(lib, opts, args): try: data = data_emitter() except mediafile.UnreadableFileError as ex: - log.error('cannot read file: {0}'.format(ex.message)) + log.error(u'cannot read file: {0}'.format(ex.message)) continue if opts.summarize: diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index 7b4551c72..019faa4c5 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -394,7 +394,7 @@ def scrape_lyrics_from_url(url): tag.name = 'p' # keep tag contents except Exception, e: - log.debug('Error {0} when replacing containing marker by p marker' + log.debug(u'Error {0} when replacing containing marker by p marker' .format(e, exc_info=True)) # Make better soup from current soup! The previous unclosed

sections @@ -527,11 +527,11 @@ class LyricsPlugin(BeetsPlugin): lyrics = u"\n\n---\n\n".join([l for l in lyrics if l]) if lyrics: - log.log(loglevel, u'fetched lyrics: %s - %s' % - (item.artist, item.title)) + log.log(loglevel, u'fetched lyrics: {0} - {1}' + .format(item.artist, item.title)) else: log.log(loglevel, u'lyrics not found: {0} - {1}' - (item.artist, item.title)) + .format(item.artist, item.title)) fallback = self.config['fallback'].get() if fallback: lyrics = fallback