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

Unified Diff: util.py

Issue 23576004: Don't send mail for policy_checklist comments. (Closed) Base URL: https://git.chromium.org/git/chromium/tools/reviewbot.git@master
Patch Set: Address feedback. Created 7 years, 4 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 | « rietveld.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util.py
diff --git a/util.py b/util.py
index 85c768777960278d6d923fc132355616238bdbb4..3eb5934d9b193c7c5716a42c59e908821fbfc102 100644
--- a/util.py
+++ b/util.py
@@ -86,3 +86,10 @@ def get_emails(string):
[ 'test@example.com', 'committers@chromium.org' ]
"""
return [entry[1] for entry in email.utils.getaddresses([string])]
+
+
+def canonicalize_email(address):
+ """Takes an email address and returns its canonicalized form."""
+ emails = get_emails(address)
+ assert len(emails) == 1
+ return emails[0]
« no previous file with comments | « rietveld.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698