summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chih-Hung Hsieh <chh@google.com> 2017-09-07 11:55:31 -0700
committer Chih-Hung Hsieh <chh@google.com> 2017-09-07 13:07:26 -0700
commit2b1efe63cf194e7fa207c0576b5ee76971f9f591 (patch)
tree4e98be51f6245aa1aaacfe4c7370ec6cd77e9ca8
parentaa599f3916702c1ff602933150b87754eb0e6278 (diff)
Accept alternative email addresses.
Some OWNERS files use secondary email addresses, so we only check existence of _account_id and email attributes. Test: run against existing OWNERS files Change-Id: I6f0804a8a90b7a23783c3fe45686d4d973876ed1
-rwxr-xr-xtools/checkowners.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/checkowners.py b/tools/checkowners.py
index b8749550da..1190d30f2c 100755
--- a/tools/checkowners.py
+++ b/tools/checkowners.py
@@ -34,8 +34,8 @@ def find_address(address):
+ urllib.quote(address))
echo('Checking email address: ' + address)
result = urllib2.urlopen(request).read()
- expected = '"email": "' + address + '"'
- checked_addresses[address] = (result.find(expected) >= 0)
+ checked_addresses[address] = (
+ result.find('"email":') >= 0 and result.find('"_account_id":') >= 0)
return checked_addresses[address]