X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=resources%2Ftools%2Fwrk%2Fwrk_traffic_profile_parser.py;fp=resources%2Ftools%2Fwrk%2Fwrk_traffic_profile_parser.py;h=f59210350bae715fe0fb134974a51a3458ff189c;hb=1056299071d3fc6f959dd04401f2492f31293e9a;hp=1994b6195d791ee44535a899e054b524cc793890;hpb=e8b2b5a90010999393cd92028dd7d274cc8852c7;p=csit.git diff --git a/resources/tools/wrk/wrk_traffic_profile_parser.py b/resources/tools/wrk/wrk_traffic_profile_parser.py index 1994b6195d..f59210350b 100644 --- a/resources/tools/wrk/wrk_traffic_profile_parser.py +++ b/resources/tools/wrk/wrk_traffic_profile_parser.py @@ -20,7 +20,7 @@ See LLD for the structure of a wrk traffic profile. from os.path import isfile from pprint import pformat -from yaml import load, YAMLError +from yaml import safe_load, YAMLError from robot.api import logger from resources.tools.wrk.wrk_errors import WrkError @@ -62,7 +62,7 @@ class WrkTrafficProfile: try: with open(self.profile_name, "r") as profile_file: - self.traffic_profile = load(profile_file) + self.traffic_profile = safe_load(profile_file) except IOError as err: raise WrkError( msg=f"An error occurred while opening the file "