X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVppApiCrc.py;h=693dac064a93f182839b74424fc897a1cd22f33c;hb=e08706e85b412b1307df3789fdbe747b43c2bd95;hp=d55058e43155105f4ab79c356850ecc0e4a81173;hpb=d68951ac245150eeefa6e0f4156e4c1b5c9e9325;p=csit.git diff --git a/resources/libraries/python/VppApiCrc.py b/resources/libraries/python/VppApiCrc.py index d55058e431..693dac064a 100644 --- a/resources/libraries/python/VppApiCrc.py +++ b/resources/libraries/python/VppApiCrc.py @@ -132,7 +132,7 @@ class VppApiCrcChecker: file_path = os.path.normpath(os.path.join( os.path.dirname(os.path.abspath(__file__)), u"..", u"..", u"api", u"vpp", u"supported_crcs.yaml")) - with open(file_path, "r") as file_in: + with open(file_path, u"rt") as file_in: collections_dict = yaml.safe_load(file_in.read()) for collection_name, name_to_crc_mapping in collections_dict.items(): self._register_collection(collection_name, name_to_crc_mapping) @@ -242,7 +242,7 @@ class VppApiCrcChecker: for filename in files: if not filename.endswith(u".api.json"): continue - with open(f"{root}/{filename}", "r") as file_in: + with open(f"{root}/{filename}", u"rt") as file_in: json_obj = json.load(file_in) msgs = json_obj[u"messages"] for msg_obj in msgs: