summaryrefslogtreecommitdiffstats
path: root/core/loader/loader_servant.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/loader/loader_servant.py')
-rw-r--r--core/loader/loader_servant.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/loader/loader_servant.py b/core/loader/loader_servant.py
index 7966532c..3b729c23 100644
--- a/core/loader/loader_servant.py
+++ b/core/loader/loader_servant.py
@@ -138,10 +138,12 @@ class LoaderServant(object):
result = {}
for _, mod in LoaderServant._load_all_modules(path):
- # find all system metric loggers defined in the module
+ # find all classes derived from given interface, but suppress
+ # interface itself and any abstract class starting with iface name
gens = dict((k, v) for (k, v) in list(mod.__dict__.items())
if type(v) == type and
- issubclass(v, interface) and k != interface.__name__)
+ issubclass(v, interface) and
+ not k.startswith(interface.__name__))
if gens:
for (genname, gen) in list(gens.items()):
result[genname] = gen