提交 cc12dab1 编写于 作者: L Lucas Meneghel Rodrigues

Merge pull request #790 from ldoktor/plugin_debug

avocado.core.plugins: Print traceback on failure
...@@ -15,11 +15,13 @@ ...@@ -15,11 +15,13 @@
"""Builtin plugins.""" """Builtin plugins."""
import os import os
import sys
import logging import logging
from importlib import import_module from importlib import import_module
from .plugin import Plugin from .plugin import Plugin
from ..settings import settings from ..settings import settings
from ...utils import stacktrace
log = logging.getLogger("avocado.app") log = logging.getLogger("avocado.app")
...@@ -59,6 +61,8 @@ def load_builtins(): ...@@ -59,6 +61,8 @@ def load_builtins():
if name not in skip_notify: if name not in skip_notify:
log.error('Error loading %s -> %s', name, reason) log.error('Error loading %s -> %s', name, reason)
ErrorsLoading.append((name, reason)) ErrorsLoading.append((name, reason))
stacktrace.log_exc_info(sys.exc_info(),
'avocado.app.tracebacks')
continue continue
for name in plugin_mod.__dict__: for name in plugin_mod.__dict__:
obj = getattr(plugin_mod, name) obj = getattr(plugin_mod, name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册