owners_client: Handle missing email in AccountInfo
Bug: 1180316
Change-Id: I8390f72d8a6cd1044ce10b7cbd4573a004a9730c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2705614
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
diff --git a/gerrit_util.py b/gerrit_util.py
index 0be70e8..7704e23 100644
--- a/gerrit_util.py
+++ b/gerrit_util.py
@@ -779,13 +779,13 @@
def GetOwnersForFile(host, project, branch, path, limit=100,
- o_params=('DETAILS',)):
+ resolve_all_users=True, o_params=('DETAILS',)):
"""Gets information about owners attached to a file."""
path = 'projects/%s/branches/%s/code_owners/%s' % (
urllib.parse.quote(project, ''),
urllib.parse.quote(branch, ''),
urllib.parse.quote(path, ''))
- q = []
+ q = ['resolve-all-users=%s' % json.dumps(resolve_all_users)]
if limit:
q.append('n=%d' % limit)
if o_params: