Commit 68324eff authored by Alan Screen's avatar Alan Screen Committed by LUCI CQ

Specify encoding for AUTHORS file

Needed to resolve "UnicodeDecodeError" for Python 3 presubmit checks.

Bug: 1210746
Change-Id: If55190ffc9f99c671a84fe9b3539317e464639cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2904927
Commit-Queue: Dirk Pranke <dpranke@google.com>
Auto-Submit: Alan Screen <awscreen@chromium.org>
Reviewed-by: 's avatarDirk Pranke <dpranke@google.com>
parent 6b0a611c
......@@ -128,7 +128,7 @@ def CheckAuthorizedAuthor(input_api, output_api, bot_allowlist=None):
input_api.PresubmitLocalPath(), 'AUTHORS')
valid_authors = (
input_api.re.match(r'[^#]+\s+\<(.+?)\>\s*$', line)
for line in open(authors_path))
for line in open(authors_path, encoding="utf-8"))
valid_authors = [item.group(1).lower() for item in valid_authors if item]
if not any(input_api.fnmatch.fnmatch(author.lower(), valid)
for valid in valid_authors):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment