aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-07-22 15:15:13 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-08-01 15:02:08 +0000
commit683fb00d41ed6a0a353cb1738b29216c05cd976e (patch)
tree8deed29bc30c0627ef6461e4899e7a72254bbc90 /api
parent90e5786f6e5bd3235e3d1c307782b8cae9d7b958 (diff)
replace yaml.load with yaml.safe_load
yaml.safe_load is safer, obviously. anteater will check for this template_format use specialized constructor based on yaml.SafeLoader JIRA: YARDSTICK-760 Change-Id: Ia3b0b3aa0765385a0ee472a4d83f49d424b5a77f Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'api')
-rw-r--r--api/resources/v1/env.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/resources/v1/env.py b/api/resources/v1/env.py
index 8943db3d1..8367fa9eb 100644
--- a/api/resources/v1/env.py
+++ b/api/resources/v1/env.py
@@ -393,7 +393,7 @@ class V1Env(ApiResource):
return result_handler(consts.API_ERROR, 'file must be provided')
LOG.info('Checking file')
- data = yaml.load(pod_file.read())
+ data = yaml.safe_load(pod_file.read())
if not isinstance(data, collections.Mapping):
return result_handler(consts.API_ERROR, 'invalid yaml file')