From 2f5165d4e1a08a1f312ba311fa283a1c59cc5291 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Thu, 20 Dec 2012 17:08:05 -0800 Subject: [PATCH] avoid loading a "phantom" plugin I'm not sure when this was introduced, but "beet version" could list a plugin called "plugins" because the load_plugins function would pick up the BeetsPlugin class itself. This was benign but confusing. --- beets/plugins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beets/plugins.py b/beets/plugins.py index 74b399adb..ce8c5ece6 100755 --- a/beets/plugins.py +++ b/beets/plugins.py @@ -171,7 +171,8 @@ def load_plugins(names=()): raise else: for obj in getattr(namespace, name).__dict__.values(): - if isinstance(obj, type) and issubclass(obj, BeetsPlugin): + if isinstance(obj, type) and issubclass(obj, BeetsPlugin) \ + and obj != BeetsPlugin: _classes.add(obj) except: