bullseye: Don't fail for non-existent projects
We don't necessarily have all projects in our tree that we get patches
for, so gracefully handle non-existent projects. An example is
bootable/recovery: We use TWRP instead of AOSP recovery.
Change-Id: I6ff630c4159095622e99ab2f6bd3dd5e2294be40
diff --git a/bullseye/bulletin.py b/bullseye/bulletin.py
index 632c1d8..041efaf 100644
--- a/bullseye/bulletin.py
+++ b/bullseye/bulletin.py
@@ -279,18 +279,21 @@
else False
)
if snippet_match:
- patches.append(
- KernelPatch(
- self._archive,
- item,
- "A-" + snippet_match.group("android_id"),
- self._manifest,
- self._args,
- snippet_match.group("subpatch"),
- snippet_match.group("kernel"),
- snippet_match.group("extra"),
+ try:
+ patches.append(
+ KernelPatch(
+ self._archive,
+ item,
+ "A-" + snippet_match.group("android_id"),
+ self._manifest,
+ self._args,
+ snippet_match.group("subpatch"),
+ snippet_match.group("kernel"),
+ snippet_match.group("extra"),
+ )
)
- )
+ except ProjectNotFoundError as e:
+ print("[BE]: WARNING: {}".format(e))
elif (
platform
and "android-{}".format(android_version) in item
@@ -299,11 +302,14 @@
issues = self._issue_mapping.get(item, None)
# TODO: `issues` will always be None, also before the latest
# refactoring.
- patches.append(
- PlatformPatch(
- self._archive, item, issues, self._manifest, self._args
+ try:
+ patches.append(
+ PlatformPatch(
+ self._archive, item, issues, self._manifest, self._args
+ )
)
- )
+ except ProjectNotFoundError as e:
+ print("[BE]: WARNING: {}".format(e))
return patches