summaryrefslogtreecommitdiffstats
path: root/api/utils/common.py
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-06-30 06:49:43 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-06-30 06:49:43 +0000
commit14bc98f0e810e37f4600cb0b16d227e8290e1db2 (patch)
treeb7ef7b0d60c018620875b185fe7b66dbd2a12ef5 /api/utils/common.py
parentbf298f7dfa5de497ef3cd69aaea7218ed7559160 (diff)
parent1b9eeb504ed9416c74e1caf8975b51ee6af86b29 (diff)
Merge "Change prepareYardstickEnv to prepare_env and add log info"
Diffstat (limited to 'api/utils/common.py')
-rw-r--r--api/utils/common.py13
1 files changed, 2 insertions, 11 deletions
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,