Some users don't have names.

This commit is contained in:
Michael Still 2014-03-13 07:18:50 +11:00
parent 7ea91f1702
commit f39fa40e07
1 changed files with 6 additions and 1 deletions

View File

@ -69,7 +69,12 @@ if __name__ == '__main__':
if not 'approvals' in j:
j['approvals'] = [{'type': 'CRVW', 'value': 0}]
author = j['author']['name']
author = j['author'].get('name', None)
if not author:
author = j['author'].get('username', None)
if not author:
author = j['author']['email']
if not author in conf.CI_USERS:
skipped_authors.setdefault(author, 0)
skipped_authors[author] += 1