Import the ipaserver plugins based on context, not env.in_server.

in_server controls how a method is dispatched, it should not also control
what plugins are imported.

This suppresses the error message "session memcached servers not running."

https://fedorahosted.org/freeipa/ticket/2499
This commit is contained in:
Rob Crittenden 2012-03-16 10:26:17 -04:00 committed by Martin Kosek
parent 7a5ca16c74
commit 95df146346

View File

@ -596,7 +596,7 @@ class API(DictProxy):
if self.env.mode in ('dummy', 'unit_test'): if self.env.mode in ('dummy', 'unit_test'):
return return
self.import_plugins('ipalib') self.import_plugins('ipalib')
if self.env.in_server: if self.env.context in ('server', 'lite'):
self.import_plugins('ipaserver') self.import_plugins('ipaserver')
if self.env.context in ('installer', 'updates'): if self.env.context in ('installer', 'updates'):
self.import_plugins('ipaserver/install/plugins') self.import_plugins('ipaserver/install/plugins')