forked from platypush/platypush
Updated the inspect
plugin to the new manifest utils interface.
This commit is contained in:
parent
043f303761
commit
1cb686bdab
1 changed files with 2 additions and 3 deletions
|
@ -20,7 +20,7 @@ from platypush.utils import (
|
||||||
get_plugin_class_by_name,
|
get_plugin_class_by_name,
|
||||||
get_plugin_name_by_class,
|
get_plugin_name_by_class,
|
||||||
)
|
)
|
||||||
from platypush.utils.manifest import Manifest, scan_manifests
|
from platypush.utils.manifest import Manifests
|
||||||
|
|
||||||
from ._context import ComponentContext
|
from ._context import ComponentContext
|
||||||
from ._model import (
|
from ._model import (
|
||||||
|
@ -116,8 +116,7 @@ class InspectPlugin(Plugin):
|
||||||
A generator that scans the manifest files given a ``base_type``
|
A generator that scans the manifest files given a ``base_type``
|
||||||
(``Plugin`` or ``Backend``) and yields the parsed submodules.
|
(``Plugin`` or ``Backend``) and yields the parsed submodules.
|
||||||
"""
|
"""
|
||||||
for mf_file in scan_manifests(base_type):
|
for manifest in Manifests.by_base_class(base_type):
|
||||||
manifest = Manifest.from_file(mf_file)
|
|
||||||
try:
|
try:
|
||||||
yield importlib.import_module(manifest.package)
|
yield importlib.import_module(manifest.package)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in a new issue