mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Handle errors raised by plugins more gracefully in mod_wsgi.
This started as an effort to display a more useful error message in the Apache error log if retrieving the schema failed. I broadened the scope a little to include limiting the output in the Apache error log so errors are easier to find. This adds a new configuration option, startup_traceback. Outside of lite-server.py it is False by default so does not display the traceback that lead to the StandardError being raised. This makes the mod_wsgi error much easier to follow.
This commit is contained in:
@@ -31,7 +31,10 @@ from ipalib import api, errors, output, uuid
|
||||
from ipalib import Command, List, Password, Str
|
||||
from ipalib.cli import to_cli
|
||||
if api.env.in_server and api.env.context in ['lite', 'server']:
|
||||
from ipaserver.plugins.ldap2 import ldap2
|
||||
try:
|
||||
from ipaserver.plugins.ldap2 import ldap2
|
||||
except StandardError, e:
|
||||
raise e
|
||||
from ipalib import _
|
||||
from ipalib.text import Gettext # FIXME: remove once the other Gettext FIXME is removed
|
||||
|
||||
|
Reference in New Issue
Block a user