Chromium Code Reviews| Index: presubmit_canned_checks.py |
| diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py |
| index bc8c3934d6a6630e30587d71098eba8b2f54c497..5f40f371b71977e1ab151dfff6ebe18e951b9a18 100644 |
| --- a/presubmit_canned_checks.py |
| +++ b/presubmit_canned_checks.py |
| @@ -852,6 +852,16 @@ def _GetRietveldIssueProps(input_api, messages): |
| issue=int(issue), messages=messages) |
| +def _ReviewersFromChange(change): |
| + """Return the reviewers specified in the |change|, if any.""" |
| + reviewers = set() |
| + if change.R: |
| + reviewers.update(set([r.strip() for r in change.R.split(',')])) |
| + if change.TBR: |
| + reviewers.update(set([r.strip() for r in change.TBR.split(',')])) |
| + return reviewers |
| + |
| + |
| def _RietveldOwnerAndReviewers(input_api, email_regexp, approval_needed=False): |
| """Return the owner and reviewers of a change, if any. |
| @@ -860,7 +870,7 @@ def _RietveldOwnerAndReviewers(input_api, email_regexp, approval_needed=False): |
| """ |
| issue_props = _GetRietveldIssueProps(input_api, True) |
| if not issue_props: |
| - return None, set() |
| + return None, _ReviewersFromChange(input_api.change) |
|
agable
2014/03/14 15:11:03
This doesn't coincide with the docstring, which sa
Ilya Sherman
2014/03/18 01:18:35
Good catch. Fixed.
|
| if not approval_needed: |
| return issue_props['owner_email'], set(issue_props['reviewers']) |