From 4ea24734f6f9c194a70ea84f1b5bddbd2462a915 Mon Sep 17 00:00:00 2001 From: "dpranke@chromium.org" Date: Mon, 14 Mar 2011 20:19:22 +0000 Subject: [PATCH] fix case where an issue may not have any messages yet Review URL: http://codereview.chromium.org/6684026 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78089 0039d316-1c4b-4281-b951-d872f2087c98 --- presubmit_canned_checks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index 40df31a59..ae6ec9760 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -670,7 +670,7 @@ def _Approvers(input_api, email_regexp): return email_regexp.match(r) and not input_api.re.match(owner, r) approvers = [] - for m in issue_props['messages']: + for m in issue_props.get('messages', []): if 'lgtm' in m['text'].lower() and match_reviewer(m['sender']): approvers.append(m['sender']) return set(approvers)