mirror of
https://github.com/aphrody-labs/cef.git
synced 2026-10-13 21:07:07 +00:00
tools: Fix assert when all file contents are excluded (see #3836)
The full contents of a file may be excluded at certain API versions.
This commit is contained in:
1 parent
e44a93551f
commit
40fef43488
1 file changed
+3
-2
@@ -343,8 +343,9 @@ class CefApiHasher:
|
||||
else:
|
||||
content_objects = self.file_content_objs.get(filename, None)
|
||||
|
||||
assert content_objects, f'content_objects is None for {filename}'
|
||||
objects.extend(content_objects)
|
||||
# May be None if the full contents of the file are excluded at certain API versions.
|
||||
if not content_objects is None:
|
||||
objects.extend(content_objects)
|
||||
|
||||
# objects will be sorted including filename to make stable hashes
|
||||
objects = sorted(objects, key=lambda o: f"{o['name']}@{o['filename']}")
|
||||
|
||||
Reference in new issue
Block a user