1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

fw/plugin: do not try to load imported classes

When scanning modules for plugins, only consider classes defined in that
module, but not those imported into it. This will prevent log output
being polluted with repeated "Skipping..." messages for imported plugin
bases.
This commit is contained in:
sergei Trofimov 2018-04-30 13:37:04 +01:00 committed by Marc Bonnici
parent ecc68ee367
commit a34858672f

View File

@ -631,6 +631,8 @@ class PluginLoader(object):
if inspect.isclass(obj):
if not issubclass(obj, Plugin):
continue
if obj.__module__ != module.__name__:
continue
if not obj.kind:
message = 'Skipping plugin {} as it does not define a kind'
self.logger.debug(message.format(obj.__name__))