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

Unified Diff: PRESUBMIT.py

Issue 7144016: Simplify the author check. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 6fface8db19a582e7b7d8188ec5be9aed076d5a0..b11ed8d40d31f70cfa535ce9e0e80d3ea7c3599d 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -111,9 +111,7 @@ def _CheckAuthorizedAuthor(input_api, output_api):
valid_authors = [item.group(1).lower() for item in valid_authors if item]
if input_api.verbose:
print 'Valid authors are %s' % ', '.join(valid_authors)
- if not any(
- True for valid in valid_authors
- if fnmatch.fnmatch(author.lower(), valid)):
+ if not any(fnmatch.fnmatch(author.lower(), valid) for valid in valid_authors):
Dirk Pranke 2011/06/14 17:44:27 why is this fnmatch? authors aren't filenames ...
M-A Ruel 2011/06/14 18:06:30 Yes but using wildcards is *much* easier than usin
return [output_api.PresubmitPromptWarning(
('%s is not in AUTHORS file. If you are a new contributor, please visit'
'\n'
« 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