diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2016-09-14 07:18:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-09-14 07:18:46 +0000 |
commit | fdfd228828e539d3068c6b413414e5dc587814e1 (patch) | |
tree | b69c3e54051811cfb0463609de3cd5d4d1ab6406 /result_collection_api/opnfv_testapi/dashboard/yardstick2Dashboard.py | |
parent | f8c3682b609b5fa238385d69e34e397ec6ec1bfd (diff) | |
parent | 6e52f48dbad2d39ebe124e6926e78fd0bca29adb (diff) |
Merge "Fix security issues of eval-s in testapi"
Diffstat (limited to 'result_collection_api/opnfv_testapi/dashboard/yardstick2Dashboard.py')
-rw-r--r-- | result_collection_api/opnfv_testapi/dashboard/yardstick2Dashboard.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/result_collection_api/opnfv_testapi/dashboard/yardstick2Dashboard.py b/result_collection_api/opnfv_testapi/dashboard/yardstick2Dashboard.py index 4f022d5..4df4b50 100644 --- a/result_collection_api/opnfv_testapi/dashboard/yardstick2Dashboard.py +++ b/result_collection_api/opnfv_testapi/dashboard/yardstick2Dashboard.py @@ -16,7 +16,6 @@ # Fio, Lmbench, Perf, Cyclictest. # - def get_yardstick_cases(): """ get the list of the supported test cases @@ -33,8 +32,8 @@ def format_yardstick_for_dashboard(case, results): then build the call to the specific method """ if check_yardstick_case_exist(case): - cmd = "format_" + case + "_for_dashboard(results)" - res = eval(cmd) + cmd = "format_" + case + "_for_dashboard" + res = globals()[cmd](results) else: res = [] print "Test cases not declared" |