Skip to content

Commit

Permalink
Handle possibly empty annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
bsquizz committed Nov 29, 2023
1 parent a5b9b93 commit 7321c8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bonfire/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,8 @@ def get_dependencies(items):
kind = item.get("kind", "")
metadata = item.get("metadata", {})
name = metadata.get("name")
bonfire_deps = metadata.get("annotations", {}).get("bonfire.dependencies", "").split(",")
annotations = metadata.get("annotations") or {}
bonfire_deps = annotations.get("bonfire.dependencies", "").split(",")
filtered_bonfire_deps = [dep for dep in bonfire_deps if dep]
if name and filtered_bonfire_deps:
log.debug(
Expand Down

0 comments on commit 7321c8a

Please sign in to comment.