Code Review
/
releng.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix security issues of eval-s in testapi
[releng.git]
/
utils
/
test
/
result_collection_api
/
opnfv_testapi
/
dashboard
/
bottlenecks2Dashboard.py
diff --git
a/utils/test/result_collection_api/opnfv_testapi/dashboard/bottlenecks2Dashboard.py
b/utils/test/result_collection_api/opnfv_testapi/dashboard/bottlenecks2Dashboard.py
index
2e106be
..
f5e3d9a
100755
(executable)
--- a/
utils/test/result_collection_api/opnfv_testapi/dashboard/bottlenecks2Dashboard.py
+++ b/
utils/test/result_collection_api/opnfv_testapi/dashboard/bottlenecks2Dashboard.py
@@
-48,8
+48,8
@@
def format_bottlenecks_for_dashboard(case, results):
then build the call to the specific method
"""
if check_bottlenecks_case_exist(case):
then build the call to the specific method
"""
if check_bottlenecks_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"
else:
res = []
print "Test cases not declared"