mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
wsgi, oddjob: remove needless uses of Env
Do not use custom Env instance to determine the debug level to use for the IPA API object - the IPA API object can properly determine the configured debug level on its own. Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
227cf8d4e9
commit
0562359f31
@@ -1,18 +1,7 @@
|
||||
from ipaplatform.paths import paths
|
||||
from ipalib import api
|
||||
from ipalib.config import Env
|
||||
from ipalib.constants import DEFAULT_CONFIG
|
||||
|
||||
# Determine what debug level is configured. We can only do this
|
||||
# by reading in the configuration file(s). The server always reads
|
||||
# default.conf and will also read in `context'.conf.
|
||||
env = Env()
|
||||
env._bootstrap(context='server', log=None, confdir=paths.ETC_IPA)
|
||||
env._finalize_core(**dict(DEFAULT_CONFIG))
|
||||
|
||||
# Initialize the API with the proper debug level
|
||||
api.bootstrap(context='server', confdir=paths.ETC_IPA,
|
||||
debug=env.debug, log=None) (ref:wsgi-app-bootstrap)
|
||||
api.bootstrap(context='server', confdir=paths.ETC_IPA, log=None) (ref:wsgi-app-bootstrap)
|
||||
try:
|
||||
api.finalize() (ref:wsgi-app-finalize)
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user