Protect extra-atcs acces

Not all projects have an extra-atcs entry.  CHeck it's in the yaml
befoer access the data.

Change-Id: I5883f4a141cd5226d5caf188f026671d23f58522
This commit is contained in:
Tony Breeds 2016-03-11 16:09:27 +11:00
parent ad1744671d
commit 7c72cd4444
1 changed files with 5 additions and 4 deletions

View File

@ -72,10 +72,11 @@ else:
exit(1)
for project in project_list:
for atc in project['extra-atcs']:
if atc['name'] == author and check_atc_date(atc):
print "Valid extra ATC record", atc
exit(0)
if 'extra-atcs' in project:
for atc in project['extra-atcs']:
if atc['name'] == author and check_atc_date(atc):
print "Valid extra ATC record", atc
exit(0)
for deliverable in project['deliverables'].values():
for repo_name in deliverable["repos"]:
url = '%s/%s/log/?qt=author&q=%s' % (BASE_URL, repo_name,