From dc4624c1b344ef62c943a72ea26cb0a369f15d41 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Sun, 2 Mar 2014 20:56:56 +0100 Subject: [PATCH] specialize exception handling when doing checksums --- beetsplug/duplicates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beetsplug/duplicates.py b/beetsplug/duplicates.py index c26864e62..63ce001d3 100644 --- a/beetsplug/duplicates.py +++ b/beetsplug/duplicates.py @@ -19,7 +19,7 @@ import logging from beets.plugins import BeetsPlugin from beets.ui import decargs, print_obj, vararg_callback, Subcommand, UserError -from beets.util import command_output, displayable_path +from beets.util import command_output, displayable_path, subprocess PLUGIN = 'duplicates' log = logging.getLogger('beets') @@ -64,7 +64,7 @@ def _checksum(item, prog): item.store() log.debug('%s: computed checksum for %s using %s', PLUGIN, item.title, key) - except Exception as e: + except subprocess.CalledProcessError as e: log.debug('%s: failed to checksum %s: %s', PLUGIN, displayable_path(item.path), e) else: