From 683fb00d41ed6a0a353cb1738b29216c05cd976e Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Sat, 22 Jul 2017 15:15:13 -0700 Subject: 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 --- api/resources/v1/env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/resources') 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') -- cgit 1.2.3-korg