Open the licenses.yaml with an explicit encoding (#9462)

This commit is contained in:
Jihoon Son 2020-03-05 17:13:44 -08:00 committed by GitHub
parent 32cd47bc8e
commit 64afc05080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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']: