From 54efd531034af64f84836757a6b12f5541736a72 Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Tue, 28 Feb 2017 16:36:57 -0800 Subject: show actual exceptions in task.py Change-Id: I40bf255ccb844ffa0a151752579b552a285f5e18 Signed-off-by: Ross Brattain --- yardstick/cmd/commands/task.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/yardstick/cmd/commands/task.py b/yardstick/cmd/commands/task.py index 0f98cabdc..03f6b1b1e 100644 --- a/yardstick/cmd/commands/task.py +++ b/yardstick/cmd/commands/task.py @@ -11,6 +11,8 @@ from __future__ import print_function from __future__ import absolute_import +import logging + from yardstick.benchmark.core.task import Task from yardstick.common.utils import cliargs from yardstick.common.utils import write_json_to_file @@ -19,6 +21,9 @@ from yardstick.cmd.commands import change_osloobj_to_paras output_file_default = "/tmp/yardstick.out" +LOG = logging.getLogger(__name__) + + class TaskCommands(object): # pragma: no cover """Task commands. @@ -49,7 +54,7 @@ class TaskCommands(object): # pragma: no cover Task().start(param, **kwargs) except Exception as e: self._write_error_data(e) - raise + LOG.exception("") def _write_error_data(self, error): data = {'status': 2, 'result': str(error)} -- cgit 1.2.3-korg