plugable: Load plugins only from modules imported by API

Previously all plugin modules imported from anywhere were added to the API.

https://fedorahosted.org/freeipa/ticket/3090

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
Jan Cholasta
2015-06-22 10:16:34 +00:00
parent 481f8ddaa3
commit 2d1515323a
10 changed files with 45 additions and 30 deletions

View File

@@ -1333,8 +1333,7 @@ def run(api):
try:
(options, argv) = api.bootstrap_with_global_options(context='cli')
for klass in cli_plugins:
api.register(klass)
api.load_plugins()
api.add_plugin(klass)
api.finalize()
if not 'config_loaded' in api.env and not 'help' in argv:
raise NotConfiguredError()