scrub: Catch IOErrors in command (fix #1297)

This commit is contained in:
Adrian Sampson 2015-02-02 10:13:48 -08:00
parent 46ba99ce79
commit 465719a208
2 changed files with 7 additions and 2 deletions

View file

@ -70,8 +70,11 @@ class ScrubPlugin(BeetsPlugin):
# Get album art if we need to restore it.
if opts.write:
mf = mediafile.MediaFile(item.path,
config['id3v23'].get(bool))
try:
mf = mediafile.MediaFile(item.path,
config['id3v23'].get(bool))
except IOError as exc:
self._log.error(u'scrubbing failed: {0}', exc)
art = mf.art
# Remove all tags.

View file

@ -93,6 +93,8 @@ Fixes:
* Improve error messages when parsing query strings with shlex. :bug:`1290`
* :doc:`/plugins/embedart`: Fix a crash that occured when used together
with the *check* plugin. :bug:`1241`
* :doc:`/plugins/scrub`: Log an error instead of stopping when the ``beet
scrub`` command cannot write a file. :bug:`1297`
For developers: