Handle missing emails.

This commit is contained in:
Michael Still 2014-03-28 13:09:36 +11:00
parent 13987164c0
commit 72d4b55b6a
1 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,7 @@
import datetime
import json
import os
import sys
import urllib
@ -108,7 +109,9 @@ for filename in changed_merge_files:
if j['type'] == 'comment-added':
author = j['author'].get('username', None)
if not author:
author = j['author']['email']
author = j['author'].get('email', None)
if not author:
continue
number = j['change']['number']
patchset = j['patchSet']['number']