From 62dd4d9a0713ac864eccce97204acc1e22789b59 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 5 May 2014 10:03:08 -0700 Subject: [PATCH] Messages might not have an author Fixes a KeyError in that case. Change-Id: If12ba5ab30d926a8614e86617f322dccd5afcda7 --- gertty/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gertty/sync.py b/gertty/sync.py index 5c0095d..0da70fa 100644 --- a/gertty/sync.py +++ b/gertty/sync.py @@ -222,7 +222,7 @@ class SyncChangeTask(Task): created = dateutil.parser.parse(remote_message['date']) if 'author' in remote_message: author_name = remote_message['author']['name'] - if remote_message['author']['username'] != app.config.username: + if remote_message['author'].get('username') != app.config.username: new_message = True else: author_name = 'Gerrit Code Review'