summaryrefslogtreecommitdiffstats
path: root/ipalib/plugable.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-10-27 23:39:43 -0600
committerJason Gerard DeRose <jderose@redhat.com>2008-10-27 23:39:43 -0600
commit83d6c95e4636049a5bcedb533ad49f6e2cf79dfe (patch)
tree4e89cfb19c8f68557ebb2e49005d3643dc1e5433 /ipalib/plugable.py
parent6e456cc7494bc00e905361f3e6d42dff99089c6b (diff)
downloadfreeipa-83d6c95e4636049a5bcedb533ad49f6e2cf79dfe.tar.gz
freeipa-83d6c95e4636049a5bcedb533ad49f6e2cf79dfe.tar.xz
freeipa-83d6c95e4636049a5bcedb533ad49f6e2cf79dfe.zip
API.load_plugins() no longer takes dry_run=False kwarg and instead checks in env.mode == 'unit_test' to decide whether to load the plugins; it also only loads ipa_server.plugins in env.in_server is True
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r--ipalib/plugable.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 6fe22429..8d689f7d 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -739,7 +739,7 @@ class API(DictProxy):
self.env._bootstrap(**overrides)
self.env._finalize_core(**dict(constants.DEFAULT_CONFIG))
- def load_plugins(self, dry_run=False):
+ def load_plugins(self):
"""
Load plugins from all standard locations.
@@ -748,10 +748,11 @@ class API(DictProxy):
"""
self.__doing('load_plugins')
self.__do_if_not_done('bootstrap')
- if dry_run:
+ if self.env.mode == 'unit_test':
return
util.import_plugins_subpackage('ipalib')
- util.import_plugins_subpackage('ipa_server')
+ if self.env.in_server:
+ util.import_plugins_subpackage('ipa_server')
def finalize(self):
"""