You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by da...@apache.org on 2016/10/19 15:46:15 UTC
[2/6] incubator-ariatosca git commit: fix plugin module
fix plugin module
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/4c566f73
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/4c566f73
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/4c566f73
Branch: refs/heads/pylint-tools
Commit: 4c566f734ab200688f50c1ea514ad69b429cb683
Parents: a19295c
Author: Dan Kilman <da...@gmail.com>
Authored: Wed Oct 19 16:22:38 2016 +0300
Committer: Dan Kilman <da...@gmail.com>
Committed: Wed Oct 19 16:53:08 2016 +0300
----------------------------------------------------------------------
aria/tools/plugin.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4c566f73/aria/tools/plugin.py
----------------------------------------------------------------------
diff --git a/aria/tools/plugin.py b/aria/tools/plugin.py
index 976ac93..bb2b974 100644
--- a/aria/tools/plugin.py
+++ b/aria/tools/plugin.py
@@ -13,18 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+"""
+Contains utility methods that enable dynamic python code loading
+# TODO: merge with tools.module
+"""
+
import os
from importlib import import_module
def plugin_installer(path, plugin_suffix, package=None, callback=None):
"""
-
- :param path:
- :param plugin_suffix:
- :param package:
- :param callback:
- :return:
+ Load each module under ``path`` that ends with ``plugin_suffix``. If ``callback`` is supplied,
+ call it with each loaded module.
"""
assert callback is None or callable(callback)
plugin_suffix = '{0}.py'.format(plugin_suffix)