From ae0d5528be4217ab72b9eff38935f8f406bce6cb Mon Sep 17 00:00:00 2001 From: Plamen Dimitrov Date: Mon, 8 Oct 2018 18:44:00 +0800 Subject: [PATCH] Be a bit more informative about plugin loading failures Signed-off-by: Plamen Dimitrov --- avocado/core/output.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/avocado/core/output.py b/avocado/core/output.py index 3b23fc58..6943480d 100644 --- a/avocado/core/output.py +++ b/avocado/core/output.py @@ -20,6 +20,7 @@ import logging import os import re import sys +import traceback from six import string_types, iterkeys @@ -703,7 +704,7 @@ def log_plugin_failures(failures): :class:`avocado.core.dispatcher.Dispatcher` attribute `load_failures` """ - msg_fmt = 'Failed to load plugin from module "%s": %s' + msg_fmt = 'Failed to load plugin from module "%s": %s :\n%s' silenced = settings.get_value('plugins', 'skip_broken_plugin_notification', list, []) @@ -711,4 +712,5 @@ def log_plugin_failures(failures): if failure[0].module_name in silenced: continue LOG_UI.error(msg_fmt, failure[0].module_name, - failure[1].__repr__()) + failure[1].__repr__(), + ''.join(traceback.format_tb(failure[1].__traceback__))) -- GitLab