X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVppApiCrc.py;h=693dac064a93f182839b74424fc897a1cd22f33c;hp=d55058e43155105f4ab79c356850ecc0e4a81173;hb=refs%2Fchanges%2F33%2F23033%2F34;hpb=5147d3ac0844b31852a3c221759f31915744b1c7 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: