fix governance tag lookup for older deliverables
When older deliverables are removed from governance we can no longer look up their tags. Return an empty list instead of failing with an error. Change-Id: Ic02ba19cfd1fca7d6695df2023bb3b126932c2e3 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
eb3e08cd78
commit
e138f09152
@ -556,7 +556,13 @@ class Deliverable(object):
|
||||
def tags(self):
|
||||
if self._gov_data is None:
|
||||
Deliverable._gov_data = governance.Governance.from_remote_repo()
|
||||
return self._gov_data.get_team(self.team).deliverables[self.name].tags
|
||||
team = self._gov_data.get_team(self.team)
|
||||
try:
|
||||
deliv = team.deliverables[self.name]
|
||||
except KeyError:
|
||||
# The deliverable is no longer listed under governance.
|
||||
return []
|
||||
return deliv.tags
|
||||
|
||||
@property
|
||||
def filename(self):
|
||||
|
Loading…
Reference in New Issue
Block a user