From dbb5721e7c1660488bf028b0a2439f792b1b93e9 Mon Sep 17 00:00:00 2001 From: John Dennis Date: Thu, 19 Nov 2009 11:56:14 -0500 Subject: If plugin fails to load log the traceback Signed-off-by: John Dennis If plugin fails to load log the traceback If a plugin fails to load due to some kind of error it would be nice if the error log contained the traceback so you can examine what went wrong rather than being left blind as to why it failed to load. --- ipalib/plugable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ipalib/plugable.py') diff --git a/ipalib/plugable.py b/ipalib/plugable.py index 3724edf55..3ee2bd545 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -582,7 +582,8 @@ class API(DictProxy): 'skipping plugin module %s: %s', fullname, e.reason ) except StandardError, e: - self.log.error('could not load plugin module %r', pyfile) + import traceback + self.log.error('could not load plugin module %r\n%s', pyfile, traceback.format_exc()) raise e def finalize(self): -- cgit