mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
makeaci, makeapi, oddjob: use the default API context
Use the default context rather the server context for code not running inside the server. This prevents the affected code from attempting to initialize the session manager. https://fedorahosted.org/freeipa/ticket/5988 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
parent
7d9afd988a
commit
2615103c68
@ -72,11 +72,11 @@ if len(args) != 1:
|
||||
trusted_domain = ipautil.fsdecode(args[0]).lower()
|
||||
|
||||
env = Env()
|
||||
env._bootstrap(context='server', debug=options.debug, log=None)
|
||||
env._bootstrap(debug=options.debug, log=None)
|
||||
env._finalize_core(**dict(DEFAULT_CONFIG))
|
||||
|
||||
# Initialize the API with the proper debug level
|
||||
api.bootstrap(context='server', debug=env.debug, log=None)
|
||||
api.bootstrap(debug=env.debug, log=None)
|
||||
api.finalize()
|
||||
|
||||
# Only import trust plugin after api is initialized or internal imports
|
||||
|
1
makeaci
1
makeaci
@ -86,7 +86,6 @@ def check_member_attrs(name, template):
|
||||
|
||||
def main(options):
|
||||
api.bootstrap(
|
||||
context='server',
|
||||
in_server=True,
|
||||
in_tree=True,
|
||||
debug=False,
|
||||
|
Loading…
Reference in New Issue
Block a user