Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ssh: don't quote ~ in remotepaths
[yardstick.git]
/
api
/
utils
/
common.py
diff --git
a/api/utils/common.py
b/api/utils/common.py
index
04a6fe0
..
e3e64a7
100644
(file)
--- a/
api/utils/common.py
+++ b/
api/utils/common.py
@@
-8,7
+8,8
@@
##############################################################################
import collections
import logging
##############################################################################
import collections
import logging
-import json
+
+from flask import jsonify
from api.utils.daemonthread import DaemonThread
from yardstick.cmd.cli import YardstickCLI
from api.utils.daemonthread import DaemonThread
from yardstick.cmd.cli import YardstickCLI
@@
-34,7
+35,7
@@
def get_command_list(command_list, opts, args):
task_args = opts.get('task-args', '')
if task_args:
task_args = opts.get('task-args', '')
if task_args:
- command_list.extend(['--task-args',
task_args
])
+ command_list.extend(['--task-args',
str(task_args)
])
return command_list
return command_list
@@
-50,7
+51,7
@@
def error_handler(message):
'status': 'error',
'message': message
}
'status': 'error',
'message': message
}
- return json
.dumps
(result)
+ return json
ify
(result)
def result_handler(status, data):
def result_handler(status, data):
@@
-58,7
+59,7
@@
def result_handler(status, data):
'status': status,
'result': data
}
'status': status,
'result': data
}
- return json
.dumps
(result)
+ return json
ify
(result)
class Url(object):
class Url(object):