Handle missing emails.

This commit is contained in:
Michael Still 2014-03-28 13:09:36 +11:00
parent 13987164c0
commit 72d4b55b6a

View File

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