fix #687: template indexes in logging statements

This commit is contained in:
Adrian Sampson 2014-04-14 10:35:20 -07:00
parent 8aec50ff8c
commit 9fd0e1d3fe
2 changed files with 5 additions and 4 deletions

View file

@ -550,10 +550,10 @@ class ReplayGainPlugin(BeetsPlugin):
if write:
item.try_write()
except ReplayGainError as e:
log.warn(u"ReplayGain error: {1}".format(e))
log.warn(u"ReplayGain error: {0}".format(e))
except FatalReplayGainError as e:
raise ui.UserError(
u"Fatal replay gain error: {1}".format(e)
u"Fatal replay gain error: {0}".format(e)
)
def handle_track(self, item, write):
@ -584,10 +584,10 @@ class ReplayGainPlugin(BeetsPlugin):
if write:
item.try_write()
except ReplayGainError as e:
log.warn(u"ReplayGain error: {1}".format(e))
log.warn(u"ReplayGain error: {0}".format(e))
except FatalReplayGainError as e:
raise ui.UserError(
u"Fatal replay gain error: {1}".format(e)
u"Fatal replay gain error: {0}".format(e)
)
def imported(self, session, task):

View file

@ -45,6 +45,7 @@ Fixes:
regression a few releases ago, only track-level metadata was being updated.
* On Windows, paths on network shares (UNC paths) no longer cause "invalid
filename" errors.
* :doc:`/plugins/replaygain`: Fix crashes when attempting to log errors.
.. _enum34: https://pypi.python.org/pypi/enum34
.. _enum: https://docs.python.org/3.4/library/enum.html