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.
This commit is contained in:
Adrian Sampson 2012-12-20 17:08:05 -08:00
parent a23b685747
commit 2f5165d4e1

View file

@ -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: