Handle deliverables with legacy teams

Errors were being thrown if a team was no longer found under governance.
We don't need to worry about that situation to get the deliverable
details.

Change-Id: Ib5459a0bd9521c296fa4f3d0743d20c1f2e5208a
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2019-04-05 12:58:52 -05:00
parent 97d2e9b044
commit 9231840e8a

View File

@ -556,10 +556,10 @@ class Deliverable(object):
def tags(self):
if self._gov_data is None:
Deliverable._gov_data = governance.Governance.from_remote_repo()
team = self._gov_data.get_team(self.team)
try:
team = self._gov_data.get_team(self.team)
deliv = team.deliverables[self.name]
except KeyError:
except (KeyError, ValueError):
# The deliverable is no longer listed under governance.
return []
return deliv.tags