diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2017-07-22 15:15:13 -0700 |
---|---|---|
committer | Ross Brattain <ross.b.brattain@intel.com> | 2017-08-01 15:02:08 +0000 |
commit | 683fb00d41ed6a0a353cb1738b29216c05cd976e (patch) | |
tree | 8deed29bc30c0627ef6461e4899e7a72254bbc90 /yardstick/benchmark/core/task.py | |
parent | 90e5786f6e5bd3235e3d1c307782b8cae9d7b958 (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 'yardstick/benchmark/core/task.py')
-rw-r--r-- | yardstick/benchmark/core/task.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py index b2da7a2ee..af508496f 100644 --- a/yardstick/benchmark/core/task.py +++ b/yardstick/benchmark/core/task.py @@ -411,7 +411,7 @@ class TaskParser(object): # pragma: no cover try: with open(self.path) as stream: - cfg = yaml.load(stream) + cfg = yaml.safe_load(stream) except IOError as ioerror: sys.exit(ioerror) @@ -475,7 +475,7 @@ class TaskParser(object): # pragma: no cover raise e print("Input task is:\n%s\n" % rendered_task) - cfg = yaml.load(rendered_task) + cfg = yaml.safe_load(rendered_task) except IOError as ioerror: sys.exit(ioerror) |