From 64afc0508049d28de89d6cbe9d68b880c7e4bf68 Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Thu, 5 Mar 2020 17:13:44 -0800 Subject: [PATCH] Open the licenses.yaml with an explicit encoding (#9462) --- distribution/bin/check-licenses.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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']: