aboutsummaryrefslogtreecommitdiff
path: root/doc/v2/examples/source/query-results.py
diff options
context:
space:
mode:
authorNeil Williams <neil.williams@linaro.org>2018-09-28 11:09:48 +0100
committerRĂ©mi Duraffort <remi.duraffort@linaro.org>2018-10-01 06:33:56 +0000
commit146e143d4a98aede60c68e975d37ec05f6947c29 (patch)
tree97c6e25e87cd80ac718d8a161f8b3a561e6d1807 /doc/v2/examples/source/query-results.py
parent01a3b0c0b6fc00fb67525fed814b4e8a6d6fb83d (diff)
Apply yaml.safe_load to unit tests
Ensure unit tests are testing the same behaviour as the rest of the source code and also reduce the amount of noise in the SAST report so that genuine issues are easier to find. Signed-off-by: Neil Williams <neil.williams@linaro.org>
Diffstat (limited to 'doc/v2/examples/source/query-results.py')
-rwxr-xr-xdoc/v2/examples/source/query-results.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/v2/examples/source/query-results.py b/doc/v2/examples/source/query-results.py
index baee5264b..a01f8c9af 100755
--- a/doc/v2/examples/source/query-results.py
+++ b/doc/v2/examples/source/query-results.py
@@ -63,7 +63,7 @@ def main(args):
return 0
print("Job, Type, Message, Time")
for result in data:
- job_lava = yaml.load(connection.results.get_testcase_results_yaml(result['id'], 'lava', 'job'))[0]
+ job_lava = yaml.safe_load(connection.results.get_testcase_results_yaml(result['id'], 'lava', 'job'))[0]
job_id = job_lava['job']
logged = job_lava['logged']
if result['status'] == INCOMPLETE: