diff --git a/README.rst b/README.rst index 542a5ef..c7b2f08 100644 --- a/README.rst +++ b/README.rst @@ -82,6 +82,21 @@ Plugin API Summary: plugin.on_start(controller_module) # optional plugin.on_shutdown(controller_module) # optional +Example Entrypoints +------------------- + +Controller: + +```python +{'sprockets.controller': ['http=sprockets.controllers.http:None']}, +``` + +Application: + +```python +{'sprockets.http.app': ['name=package.or.module:None']} +``` + Applications ------------ diff --git a/sprockets/cli/__init__.py b/sprockets/cli/__init__.py index f1f95a0..b0aa2c6 100644 --- a/sprockets/cli/__init__.py +++ b/sprockets/cli/__init__.py @@ -292,7 +292,7 @@ class CLI(object): """ for pkg in self._get_applications(controller): if pkg.name == application: - return pkg.module_name + return importlib.import_module(pkg.module_name) return importlib.import_module(application) @staticmethod