From 413666a82531bed46291f6e458aa78b92b1ee9c8 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Wed, 28 Dec 2016 16:36:51 -0500 Subject: [PATCH] Fix #2351: crash in scrub on MediaFile errors --- beetsplug/scrub.py | 1 + docs/changelog.rst | 2 ++ 2 files changed, 3 insertions(+) diff --git a/beetsplug/scrub.py b/beetsplug/scrub.py index 4dcefe572..8ecf8ad5d 100644 --- a/beetsplug/scrub.py +++ b/beetsplug/scrub.py @@ -122,6 +122,7 @@ class ScrubPlugin(BeetsPlugin): except mediafile.UnreadableFileError as exc: self._log.error(u'could not open file to scrub: {0}', exc) + return art = mf.art # Remove all tags. diff --git a/docs/changelog.rst b/docs/changelog.rst index 116f564df..e5e027016 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -23,6 +23,8 @@ Features: Fixes: * :doc:`/plugins/bpd`: Fix a crash on non-ASCII MPD commands. :bug:`2332` +* :doc:`/plugins/scrub`: Avoid a crash when files cannot be read or written. + :bug:`2351` For plugin developers: new importer prompt choices (see :ref:`append_prompt_choices`), you can now provide new candidates for the user to consider.