Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(724)

Unified Diff: presubmit_canned_checks.py

Issue 6684026: fix case where an issue may not have any messages yet (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index 40df31a59d60bb2bd9f5006f3cf9641652456f0d..ae6ec97608362c94d33750ce1cd903a6ca114c80 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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698