Skip to content

Commit e7ba913

Browse files
committed
chromium/generate_license_list.py: Check whether the license file exist
With newer Chromium versions, most of the licenses returned by find_chromium_licenses() are missing from the tarball. Check whether the file exists to avoid throwing an exception in open(license_file, 'rb'). Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
1 parent 407e3ac commit e7ba913

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

meta-chromium/recipes-browser/chromium/generate_license_list.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ def print_license_list(chromium_root, output_file):
9393
suitable for use in a Yocto recipe."""
9494
licenses = {}
9595
for license_file in find_chromium_licenses(chromium_root):
96+
if not os.path.exists(license_file):
97+
continue
9698
with open(license_file, 'rb') as file_handle:
9799
license_hash = hashlib.md5(file_handle.read()).hexdigest()
98100
license_relpath = os.path.relpath(license_file, chromium_root)

0 commit comments

Comments
 (0)