summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/constants.py1
-rw-r--r--ipalib/plugable.py5
-rw-r--r--ipalib/plugins/migration.py5
3 files changed, 8 insertions, 3 deletions
diff --git a/ipalib/constants.py b/ipalib/constants.py
index 05fa1e667..20f1d95d7 100644
--- a/ipalib/constants.py
+++ b/ipalib/constants.py
@@ -120,6 +120,7 @@ DEFAULT_CONFIG = (
# Debugging:
('verbose', 0),
('debug', False),
+ ('startup_traceback', False),
('mode', 'production'),
# CA plugin:
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 397004eb1..fd5f31a76 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -536,8 +536,9 @@ class API(DictProxy):
'skipping plugin module %s: %s', fullname, e.reason
)
except StandardError, e:
- import traceback
- self.log.error('could not load plugin module %r\n%s', pyfile, traceback.format_exc())
+ if self.env.startup_traceback:
+ import traceback
+ self.log.error('could not load plugin module %r\n%s', pyfile, traceback.format_exc())
raise e
def finalize(self):
diff --git a/ipalib/plugins/migration.py b/ipalib/plugins/migration.py
index 55a21572c..a2773efb8 100644
--- a/ipalib/plugins/migration.py
+++ b/ipalib/plugins/migration.py
@@ -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