update-authors-json: Fix handling deleted GitHub accounts.

Apparently, we've now had the first time one of our contributors had
their account deleted (at least, the author page for the contributor
who has 21 commits in python-zulip-api now 404s).
This commit is contained in:
Tim Abbott 2018-02-08 12:16:14 -08:00
parent 9e70026741
commit 9249454518
1 changed files with 3 additions and 0 deletions

View File

@ -85,6 +85,9 @@ def run_production() -> None:
if contribs:
repos_done.append(name)
for contrib in contribs:
if contrib.get('author') is None:
# This happens for users who've deleted their GitHub account.
continue
username = contrib.get('author').get('login')
contrib_data = {
'avatar': contrib.get('author').get('avatar_url'),