Skip to content

Commit e7df53c

Browse files
committed
catch errors related to update_on_build check
1 parent c9b5375 commit e7df53c

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

lilac

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -446,15 +446,18 @@ def check_buildability(
446446
return None
447447

448448
if db.USE:
449-
update_on_build = REPO.lilacinfos[pkg].update_on_build
450-
if update_on_build and not to_build.on_build_vers:
451-
# Fill in on_build_vers for packages that are not triggered by OnBuild.
452-
# Provide the last version string as both old and new since it's not
453-
# triggered by a change of them.
454-
vers = [
455-
(new, new) for _, new in db.get_update_on_build_vers(update_on_build)
456-
]
457-
to_build = PkgToBuild(pkg, vers)
449+
if mod2 := REPO.lilacinfos.get(pkg):
450+
update_on_build = mod2.update_on_build
451+
if update_on_build and not to_build.on_build_vers:
452+
# Fill in on_build_vers for packages that are not triggered by OnBuild.
453+
# Provide the last version string as both old and new since it's not
454+
# triggered by a change of them.
455+
vers = [
456+
(new, new) for _, new in db.get_update_on_build_vers(update_on_build)
457+
]
458+
to_build = PkgToBuild(pkg, vers)
459+
else:
460+
logger.warning('%s not in lilacinfos.', pkg)
458461

459462
return to_build
460463

0 commit comments

Comments
 (0)