Only log error when no load handler is set
Only log an error from loading a plugin if no load failure handler callback is provided. Otherwise, assume the handler will do any logging it wants. Change-Id: Iac83f3c140067bc3d1996c40c0184e4a0d0b564a
This commit is contained in:
parent
180b1789e3
commit
2bbf3eb569
@ -166,10 +166,11 @@ class ExtensionManager(object):
|
||||
except (KeyboardInterrupt, AssertionError):
|
||||
raise
|
||||
except Exception as err:
|
||||
LOG.error('Could not load %r: %s', ep.name, err)
|
||||
LOG.exception(err)
|
||||
if self._on_load_failure_callback is not None:
|
||||
self._on_load_failure_callback(self, ep, err)
|
||||
else:
|
||||
LOG.error('Could not load %r: %s', ep.name, err)
|
||||
LOG.exception(err)
|
||||
return extensions
|
||||
|
||||
def _load_one_plugin(self, ep, invoke_on_load, invoke_args, invoke_kwds,
|
||||
|
Loading…
x
Reference in New Issue
Block a user