Commit 4c7ce992 authored by dpranke@chromium.org's avatar dpranke@chromium.org

Fix a crash in the owners check for a change without reviewers.

If we uploaded a CL w/o any reviewers specified, and then
ran the owners check on it (so that we had a Rietveld
issue number) we would crash in a Python assertion. This
wasn't caught in unit testing because of a limitation
in the unit test scaffolding.

TBR=maruel@chromium.org
BUG=None


Review URL: https://chromiumcodereview.appspot.com/12546003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@186454 0039d316-1c4b-4281-b951-d872f2087c98
parent f6ddfa4b
......@@ -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'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment