Skip to content

Commit e8cb124

Browse files
committed
badfiles: If not configured, use default checkers
1 parent 27075ea commit e8cb124

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

beetsplug/badfiles.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from beets.plugins import BeetsPlugin
2222
from beets.ui import Subcommand
23-
from beets.util import displayable_path
23+
from beets.util import displayable_path, confit
2424
from beets import ui
2525
from subprocess import check_output, CalledProcessError, list2cmdline, STDOUT
2626
import shlex
@@ -64,7 +64,10 @@ def checker(path):
6464

6565
def get_checker(self, ext):
6666
ext = ext.lower()
67-
command = self.config['commands'].get().get(ext)
67+
try:
68+
command = self.config['commands'].get(dict).get(ext)
69+
except confit.NotFoundError:
70+
command = None
6871
if command:
6972
return self.check_custom(command)
7073
elif ext == "mp3":

0 commit comments

Comments
 (0)