From 72b246f20a7e4167f11b389f39ab511d69c832e8 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Sun, 2 Aug 2015 01:04:47 -0600 Subject: [PATCH] Don't crash if username field is missing. --- buildbot/github_buildbot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildbot/github_buildbot.py b/buildbot/github_buildbot.py index 5dcd4b9e..a4f0c6f1 100755 --- a/buildbot/github_buildbot.py +++ b/buildbot/github_buildbot.py @@ -139,7 +139,8 @@ def process_change(self, payload, user, repo, repo_url, project, request): for change in payload['commits']: files = change['added'] + change['removed'] + change['modified'] who = "%s <%s>" % ( - change['author']['username'], change['author']['email']) + change['author']['username'] if 'username' in change["author"] else change["author"]["name"], + change['author']['email']) changes.append( {'revision': change['id'],