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:
parent
ecc68ee367
commit
a34858672f
@ -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__))
|
||||
|
Loading…
x
Reference in New Issue
Block a user