[check-release-approval] Handle PTL-less projects

Not all teams have PTLs now. Don't assume we will get PTL information as
we check for approvals on release patches.

Change-Id: Id0d6eeaf66394806374781d1cf26c087a6e90f87
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-11-30 09:35:51 -06:00
parent b202e8c212
commit d0b96ad639
1 changed files with 2 additions and 1 deletions

View File

@ -127,7 +127,8 @@ class GerritChange(object):
# Fetch PTL and release liaisons
liaisons = get_liaisons(self.workspace, team)
if 'email' in govteam['ptl']:
# Some teams may be PTL-less, so don't assume we have PTL info
if 'email' in govteam.get('ptl', {}):
liaisons.append(govteam['ptl']['email'])
LOG.debug('%s needs %s' % (deliv_file, liaisons))