From 465719a2087c2ff75441e06e1e30064f64e05e39 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Mon, 2 Feb 2015 10:13:48 -0800 Subject: [PATCH] scrub: Catch IOErrors in command (fix #1297) --- beetsplug/scrub.py | 7 +++++-- docs/changelog.rst | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/beetsplug/scrub.py b/beetsplug/scrub.py index 5c0d74e6e..066387f74 100644 --- a/beetsplug/scrub.py +++ b/beetsplug/scrub.py @@ -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. diff --git a/docs/changelog.rst b/docs/changelog.rst index c0cf49b12..77ef019ab 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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: