diff --git a/distribution/bin/check-licenses.py b/distribution/bin/check-licenses.py index b80bfeba840..4b47947239a 100755 --- a/distribution/bin/check-licenses.py +++ b/distribution/bin/check-licenses.py @@ -323,8 +323,8 @@ def check_licenses(license_yaml, dependency_reports_root): # Build registered license dictionary. registered_dep_to_licenses = {} skipping_licenses = {} - with open(license_yaml) as registry_file: - licenses_list = list(yaml.load_all(registry_file)) + with open(license_yaml, encoding='utf-8') as registry_file: + licenses_list = list(yaml.load_all(registry_file, Loader=yaml.FullLoader)) for license in licenses_list: if 'libraries' in license: for library in license['libraries']: