diff --git a/beetsplug/scrub.py b/beetsplug/scrub.py index b652fa2f5..be6e7fd1f 100644 --- a/beetsplug/scrub.py +++ b/beetsplug/scrub.py @@ -24,6 +24,7 @@ from beets import ui from beets import util from beets import config from beets import mediafile +import mutagen _MUTAGEN_FORMATS = { 'asf': 'ASF', @@ -106,7 +107,7 @@ class ScrubPlugin(BeetsPlugin): for tag in f.keys(): del f[tag] f.save() - except IOError as exc: + except (IOError, mutagen.MutagenError) as exc: self._log.error(u'could not scrub {0}: {1}', util.displayable_path(path), exc) diff --git a/docs/changelog.rst b/docs/changelog.rst index 3e167b6c2..07d2dff74 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -63,6 +63,8 @@ Fixes: ignored. * :doc:`/plugins/replaygain`: Fix album replaygain calculation with the gstreamer backend. :bug:`2636` +* :doc:`/plugins/scrub`: Handle errors when manipulating files using newer + versions of Mutagen. :bug:`2716` For developers: