From 0749d4716cd14e7505a6df5c4da81328a6f6cbce Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sat, 11 Oct 2014 12:28:41 -0700 Subject: [PATCH] duplicates: Fix #999 (check "checksum" type) --- beetsplug/duplicates.py | 4 ++++ docs/changelog.rst | 2 ++ 2 files changed, 6 insertions(+) diff --git a/beetsplug/duplicates.py b/beetsplug/duplicates.py index fe0f8ac00..8e0af4ab7 100644 --- a/beetsplug/duplicates.py +++ b/beetsplug/duplicates.py @@ -209,6 +209,10 @@ class DuplicatesPlugin(BeetsPlugin): fmt += ': {0}' if checksum: + if not isinstance(checksum, basestring): + raise UserError( + 'duplicates: "checksum" option must be a command' + ) for i in items: k, _ = _checksum(i, checksum) keys = [k] diff --git a/docs/changelog.rst b/docs/changelog.rst index 33d7a8694..d89a5cd38 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -30,6 +30,8 @@ Fixes: beets and instead fail silently. * Slow queries, such as those over flexible attributes, should now be much faster when used with certain commands---notably, the :doc:`/plugins/play`. +* :doc:`/plugins/duplicates`: Emit an error when the ``checksum`` config + option is set incorrectly. 1.3.8 (September 17, 2014)