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

Unified Diff: presubmit_canned_checks.py

Issue 12546003: Fix a crash in the owners check for a change without reviewers. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: fix _RietveldOwnerAndReviewers to never return None Created 7 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 0f100d9bfc37e6d472e0cb2214f7c9beb304ef24..f7aa29f90ee541c0d3fa93eb3787a5556b840e3f 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -796,7 +796,7 @@ def CheckOwners(input_api, output_api, source_file_filter=None,
owner_email = owner_email or input_api.change.author_email
if author_counts_as_owner and owner_email:
- reviewers_plus_owner = set([owner_email]).union(reviewers or set())
+ reviewers_plus_owner = set([owner_email]).union(reviewers)
missing_files = owners_db.files_not_covered_by(affected_files,
reviewers_plus_owner)
else:
@@ -833,7 +833,7 @@ def _RietveldOwnerAndReviewers(input_api, email_regexp, approval_needed=False):
"""
issue_props = _GetRietveldIssueProps(input_api, True)
if not issue_props:
- return None, None
+ return None, set()
if not approval_needed:
return issue_props['owner_email'], set(issue_props['reviewers'])
« 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