From 1b9eeb504ed9416c74e1caf8975b51ee6af86b29 Mon Sep 17 00:00:00 2001 From: chenjiankun Date: Fri, 30 Jun 2017 02:32:55 +0000 Subject: Change prepareYardstickEnv to prepare_env and add log info JIRA: YARDSTICK-697 Currently the action in env like prepareYardstickEnv, createGrafanaContainer, createInfluxDBContainer, this is not python style. So I do some change: prepareYardstickEnv->prepare_env createGrafanaContainer->create_grafana createInfluxDBContainer->create_influxdb And also add some log info in env_action. Change-Id: Ia91576b975f3de76b96e312779fda4911e7cac24 Signed-off-by: chenjiankun --- api/utils/common.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'api/utils') diff --git a/api/utils/common.py b/api/utils/common.py index 8398b8f60..eda9c17dd 100644 --- a/api/utils/common.py +++ b/api/utils/common.py @@ -13,8 +13,8 @@ import logging from flask import jsonify import six -logger = logging.getLogger(__name__) -logger.setLevel(logging.DEBUG) +LOG = logging.getLogger(__name__) +LOG.setLevel(logging.DEBUG) def translate_to_str(obj): @@ -27,15 +27,6 @@ def translate_to_str(obj): return obj -def error_handler(message): - logger.debug(message) - result = { - 'status': 'error', - 'message': message - } - return jsonify(result) - - def result_handler(status, data): result = { 'status': status, -- cgit 1.2.3-korg